-
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
[RNMobile] Simplify media insertion flow #25031
Closed
jd-alexander
wants to merge
70
commits into
WordPress:trunk
from
jd-alexander:rnmobile/simplify_image_insertion_flow
Closed
Changes from 54 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
67c84d9
automatically open the media options bottom sheet
jd-alexander e8940fd
remove the image if the cancel option is selected.
jd-alexander d795232
added the clear media option.
jd-alexander 3c29025
fixed the order of the cancel button.
jd-alexander 0bc20d7
put a newline to separate cancellation if logic from the code below
jd-alexander 9f3269b
made variable names more meaningful.
jd-alexander 7de89e0
shared the destructiveButton logic between the Image & Cover block.
jd-alexander d488ba8
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 8163ce6
merging resolved conflicts.
jd-alexander 6a9d981
reverted the Image Editing Button behavior to having the ability to …
jd-alexander 3de9cf0
Reverted changes to the ImageComponent and passed in the Clear Media …
jd-alexander 59c36db
remove the delete behavior from the image block.
jd-alexander 3cdde20
Utilize a delay on iOS so that the inserter being closed doesn't dism…
jd-alexander 60a3feb
remove unnecessary line.
jd-alexander 8966c23
put the mediaPickerOptions back in the correct location to eliminate …
jd-alexander 0bfe3d6
pass the autoOpenMediaUpload flag to the MediaUpload component so it …
jd-alexander f72c3ae
moved delaying logic to the MediaUpload onPickerPresent function.
jd-alexander 0ce172c
Once the media is cleared then the picker should not be shown.
jd-alexander e608165
removed unneeded MEDIA_UPLOAD_CANCEL type
jd-alexander c104069
revert changes made to the Cover block with onClearMedia logic.
jd-alexander 0628c3f
removed unneeded variable for autoOpenMediaUpload
jd-alexander 4148aca
added auto open to the Video block.
jd-alexander cb8f9e0
added the auto open to the Image Gallery block.
jd-alexander ff3e869
removed unneeded state and passed the auto open logic as an expression.
jd-alexander 3016466
paused auto open logic as an expression to autoOpenMediaUpload.
jd-alexander af882b8
added a comment about why the delay is necessary on iOS.
jd-alexander 07cea7b
attempt at fixing tests.
jd-alexander 7ad8fc8
Changed the iOS Picker's termination action text from Cancel to Dismiss.
jd-alexander 3f113a7
changed button accessibility id from Cancel to Dismiss.
jd-alexander 23dc6fe
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 372306f
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander f217d4a
use driver.sleep( 1000 ) to ensure that the bottom sheet is visible.
jd-alexander e598262
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander e3d3eeb
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 96d6b7a
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 1b9656b
The Undo and clearMedia buttons do not trigger the media upload picker
jd-alexander 653b416
bottom sheet is not triggered for undo operations on the video block.
jd-alexander 252c74e
bottom sheet is not triggered for clear or undo gallery operations
jd-alexander 458499a
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 4691407
converted behavior to utilize hooks in the gallery component.
jd-alexander ae0c58c
added actions for the block insertion events.
jd-alexander 7b49207
Updated actions, reducer and selectors to support block inserted.
jd-alexander 6cf07a6
added block insertion event to menu.
jd-alexander 206a83f
Added wasBlockJustInserted to utilize it to open the bottom sheet.
jd-alexander d3cfdfa
Removed already opened logic and bound the wasBlockJustInserted
jd-alexander 2fcaaab
simplified redux approach for auto opening.
jd-alexander 350aef7
removed unneeded true comparison
jd-alexander 043a9b6
renamed the behavior from blockInsertionEvent to lastBlockInserted
jd-alexander 20e79e4
added the wasBlockJustInserted call to the Image block.
jd-alexander 2fec1cc
added wasBlockJustInserted functionality to the Gallery flow.
jd-alexander e396965
added wasBlockJustInserted to the Video component.
jd-alexander 397b79f
Updated the comment so it's more meaningful.
jd-alexander ef86342
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander cb7aeaf
improved the comment of the lastBlockInserted selector
jd-alexander 6afbaf8
Update packages/editor/src/store/selectors.native.js
jd-alexander f114df8
Merge branch 'master' into rnmobile/simplify_image_insertion_flow
jd-alexander 35b703b
fixed issues that arose during the merge.
jd-alexander fd49e34
removed optimist block from reducer combination.
jd-alexander d56673f
Merge branch 'trunk' into rnmobile/simplify_image_insertion_flow
jd-alexander f76fd03
Utilized the useDispatch hook approach for last block inserted.
jd-alexander fd0e7dd
fixed lint errors.
jd-alexander c1c0087
Utilized editorPage.driver instead of driver reference.
jd-alexander fb4d162
added unit tests for the selectors.
jd-alexander 21ce189
renamed the title of test group to match with tests within the store
jd-alexander 91556bc
removed unneeded client from CLEAR_LAST_BLOCK_INSERTED
jd-alexander 7030c9d
added unit tests for the actions and reducers of the last block inserted
jd-alexander f664f27
made test values simpler.
jd-alexander d0a8610
added documentation for changes to the MediaPlaceholder component.
jd-alexander e23f7df
Merge branch 'trunk' into rnmobile/simplify_image_insertion_flow
jd-alexander ca7eee3
updated MediaUpload and MediaPlaceholder documentation.
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 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 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 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 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 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 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 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 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 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 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.
That doesn't look like the most stable approach. I wonder what's that close event you're talking about? Maybe we could fix the underlying issue?
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.
Thanks for pointing this out :) What I meant to say here is that when the Inserter is being closed and this media upload action sheet/modal is being shown at the same time it is closed as it opens. What I think is happening is whatever mechanism is being used internally by iOS to close the inserter modal also closes any other modals that are on the screen. So yes, I know this approach isn't stable but the slight delay just ensured the the new modal wouldn't be on the screen at the same time. I just realized Eduardo's comment spoke about this in detail :)