-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[RNMobile] Long-press on inserter to show options for "add above" and "add below" #18791
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
SergioEstevao
merged 36 commits into
WordPress:master
from
ceyhun:rnmobile/1433-long-press-on-inserter-to-show-add-above-below
Jan 29, 2020
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9fdbf76
Add onLongPress prop to Button
ceyhun d1e7ea2
Show inserter menu on long press
ceyhun 4ecb48d
Make onLongPress a prop of toggle
ceyhun d6b716e
Make withSelect of Inserter return destinationRootClientId
ceyhun 46d8206
Insert default block before the selected one on long press
ceyhun 0d13ef7
Add add canReplaceBlock key to the insertionPoint state
ceyhun 3fee2af
Hide a block in list only if it can be replaced
ceyhun 07cd4fa
Move insertion index logic from menu to inserter
ceyhun df0c42b
Update selector tests for newly added key in state
ceyhun cd74cfc
Update docs for newly added key in state
ceyhun 9fcfe3b
Add insertionIndexAfter and isAnyBlockSelected props with selector
ceyhun eb2ec38
Refactor insertion index logic
ceyhun 8771782
Add insertionType to component state and map to insertion index
ceyhun c7101b8
Show BottomSheet on long press to choose to insert before or after
ceyhun 4bc8825
Update UI strings to be title case
ceyhun 2430eb3
Hide cancel button from Bottom Sheet on Android
ceyhun 1ccf577
Add icons to Bottom Sheet options on Android
ceyhun ececc84
Add “Replace Current Block” option to menu on long-press
ceyhun aa7231b
Scroll to newly added block if it doesn't trigger keyboard to open
ceyhun a42307a
Change “Replace Current Block” menu icon on Android
ceyhun 20eab25
Use shorter syntax for setState
ceyhun 2914a4b
Rename getShouldReplaceBlock method to shouldReplaceBlock
ceyhun 5c14c4b
Revert "Scroll to newly added block if it doesn't trigger keyboard to…
ceyhun 997a73d
Revert “Add canReplaceBlock key to the insertionPoint state"
ceyhun 70062a0
Remove Block show/hide logic from BlockList
ceyhun c5a6079
Update Inserter local state to store block insertion information
ceyhun 2ae9e99
Make InserterMenu add/remove unmodified default block during replace
ceyhun 15f7651
Handle replacing last remaining block
ceyhun 682c471
Fix Inserter test
ceyhun 3b05a40
Fix code style issue
ceyhun 8b35936
Move insertion options into getInsertionOptions function
ceyhun 7f08b8d
Add comment about removing last block case
ceyhun b2c2fc8
Use findByProps instead of toJSON when testing Inserter
ceyhun 5f1aec9
Merge branch 'master' into rnmobile/1433-long-press-on-inserter-to-sh…
ceyhun 5164247
Merge branch 'master' into rnmobile/1433-long-press-on-inserter-to-sh…
ceyhun e345e42
Merge branch 'master' into rnmobile/1433-long-press-on-inserter-to-sh…
ceyhun 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
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.
Uh oh!
There was an error while loading. Please reload this page.