-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove media collection bridge functions #59547
Remove media collection bridge functions #59547
Conversation
Size Change: 0 B Total Size: 1.71 MB ℹ️ View Unchanged
|
export function mediaSaveSync() { | ||
return RNReactNativeGutenbergBridge.mediaSaveSync(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference).
* @param {Array<Map>} mediaFiles the mediaFiles attribute of the block, containing data about each media item. | ||
* @param {string} blockClientId the clientId of the block. | ||
*/ | ||
export function requestMediaFilesEditorLoad( mediaFiles, blockClientId ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference)
* | ||
* @param {Array<Map>} mediaFiles the mediaFiles attribute of the block, containing data about each media item | ||
*/ | ||
export function requestMediaFilesFailedRetryDialog( mediaFiles ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference)
* | ||
* @param {Array<Map>} mediaFiles the mediaFiles attribute of the block, containing data about each media item | ||
*/ | ||
export function requestMediaFilesUploadCancelDialog( mediaFiles ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference)
* | ||
* @param {Array<Map>} mediaFiles the mediaFiles attribute of the block, containing data about each media item. | ||
*/ | ||
export function requestMediaFilesSaveCancelDialog( mediaFiles ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference)
* @param {Array<Map>} mediaFiles the mediaFiles attribute of the block, containing data about each media item. | ||
* @param {string} blockClientId the clientId of the block. | ||
*/ | ||
export function mediaFilesBlockReplaceSync( mediaFiles, blockClientId ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in Story block (reference)
func gutenbergDidRequestMediaSaveSync() {} | ||
func gutenbergDidRequestMediaFilesEditorLoad(_ mediaFiles: [[String: Any]], blockId: String) { } | ||
func gutenbergDidRequestMediaFilesFailedRetryDialog(_ mediaFiles: [[String: Any]]) { } | ||
func gutenbergDidRequestMediaFilesUploadCancelDialog(_ mediaFiles: [[String: Any]]) { } | ||
func gutenbergDidRequestMediaFilesSaveCancelDialog(_ mediaFiles: [[String: Any]]) { } | ||
func gutenbergDidRequestMediaFilesBlockReplaceSync(_ mediaFiles: [[String: Any]], clientId: String) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are optional, only gutenbergDidRequestMediaFilesEditorLoad
is actually implemented in the host app.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, smoke tested the editor on both platforms and confirmed I spotted no regressions. 🚀
Related PRs:
What?
Remove React Native bridge functions related to media collection.
Why?
These functions are no longer used, so we are removing them to clean up the bridge code.
How?
Remove bridge functions and related code.
Testing Instructions
The changes shouldn't affect the current version of the editor. For testing, we could just smoke testing the editor and observe that works as expected.
Testing Instructions for Keyboard
N/A
Screenshots or screencast
N/A