-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Gutenberg] Audio block - Consolidated & Normal Media Picker Integration #13612
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
Merged
develric
merged 41 commits into
develop
from
gutenberg/audio_block_consolidated_media_picker_integration
Jan 18, 2021
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
1e75b68
Added GUTENBERG_SINGLE_AUDIO_FILE_PICKER to the MediaBrowserType
jd-alexander 08bd4aa
Added support for selecting Audio from Media Library or Local Device.
jd-alexander 9c89fa3
wired media pickers to the click actions of the Audio block.
jd-alexander 6b389c4
Updated gutenberg ref.
jd-alexander 10992e1
Trigger Build
jd-alexander 4163371
Changed location of prepare picture intent and fixed multiselect params
jd-alexander b286de9
Added prepareAudioLibraryIntent method.
jd-alexander b73c139
Added prepareAudioLibraryIntent and did refactoring of duplicate logic.
jd-alexander ff71990
added showMediaPicker for file and audio.
jd-alexander 203de09
created a function that allows the audio file picker to be launched.
jd-alexander a8a1e82
added the editor_audio_file_added event to track audio files.
jd-alexander 408cf6d
Integrated the Audio Library Request Code in the necessary activities.
jd-alexander e4039c0
Refactored the initOtherMediaFileOptions to support both audio and file.
jd-alexander f278d14
Updated the FluxC hash to include the audio mime type behavior.
jd-alexander c724657
Removed audio from the file resource variable.
jd-alexander bff3d36
removed unused imports.
jd-alexander 7149d57
Merge branch 'develop' into gutenberg/audio_block_consolidated_media_…
jd-alexander 903229e
Updated ref.
jd-alexander 554bb06
sync stories submodule with develop.
jd-alexander 5f70822
Update gb ref.
jd-alexander ed598e6
updated FluxC hash.
jd-alexander 55f8c92
Fixed issue where the file library intent was prepared instead of audio
jd-alexander 55b5345
added the Audio Picking BrowserType to the MediaBrowser's Filter.
jd-alexander a881acf
Added use audio to the action mode title logic
jd-alexander 3ca76e1
Refactored the name of the MediaPicker function to FilePicker.
jd-alexander 66199d8
Removed unneeded trailing comma and R. import.
jd-alexander a286d91
removed the additional audioFileLibrary method and reused the file one.
jd-alexander fbc51cf
Added a string value for choosing audio files and refactored launchFile
jd-alexander b87c11e
Added a method for GUTENBERG_SINGLE_AUDIO_FILE_PICKER to filter the grid
jd-alexander 97abd5a
refactored the launchFileLibrary to work for audio and file intents.
jd-alexander 8262169
Added the audio picker to the single selection.
jd-alexander aedea20
Added AUDIO to the ChooserContext
jd-alexander beb48b7
Added AUDIO to the populateIconClickEvent
jd-alexander 7815032
Added test for Audio System Picker
jd-alexander 1e5aa6d
removed multiSelect intent param and utilized true.
jd-alexander 3309187
Put the .SingleAudioFilePicker call in the appropriate group.
jd-alexander adbb939
Merge branch 'develop' into gutenberg/audio_block_consolidated_media_…
jd-alexander 9f745ae
Updated fluxC hash.
jd-alexander a75a1b3
Updated gb ref.
jd-alexander 21e7726
Merge branch 'develop' into gutenberg/audio_block_consolidated_media_…
jd-alexander 8025aaf
Merge branch 'develop' into gutenberg/audio_block_consolidated_media_…
jd-alexander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I am not sure if this approach is fine. What I did here was I duplicated the
showFilePickermethod because I need theallowTypesto be different for the file and audio pickers. At first, I thought of making this property a default one in the method params but this doesn't work with Java. Is this behavior okay? Or should I do some form of method override? Let me know.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.
Also, I didn't bother to bring the Normal Picker behavior up to speed here because it seems like the consolidated media picker will be the only one in use for the near future so I thought I would waste time building it out and there's a high possibility we won't do a rollback. Was that the right judgment call? ? I did make modifications in the past to support the File Block's file selection behavior on the normal and consolidated picker hence my question.
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.
What I would consider doing here is creating a private fun that incorporates the common code and that accepts
(activity, canMultiselect, allowedTypes)then the publicly exposed methods (showFilePicker, showAudioFilePicker) can call this private fun passing the desired allowedTypes (I would not expose the allowedTypes as public fun params though so the calling function should not worry about it). This in a way also ease the second item:I think the rationale here was as you mention to allow an easy rollback (doing it by remote) in case of any issues with the consolidated media picker. To allow this we need to have the standard media picker fallback in place. I agree it's pretty unlikely we should rollback since the media picker has been released in 16.2 already, but until we do not remove this
duplicatedapproach (probably in other couple of release or so) I would keep this consistent. wdyt?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.
This is great insight @develric I am going to do this implementation and then share my findings with you.
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.
Done ff71990 3ca76e1