-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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] Inner Block Navigate upward through hierarchy #17496
Conversation
packages/block-editor/src/components/block-list/block.native.js
Outdated
Show resolved
Hide resolved
@iamthomasbishop should we be showing the navigating up button at the outer most block? I think that button is just making floating toolbar disappear in that case since there's no where else to navigate to. |
Yes, we should show that |
During development I have noticed that it is comfortable to use this navigation-up button to clear the selection (specially when it will be combined with dashed borders on InnerBlocks) so I'm happy with that decision. Thanks ! |
@mapk @jasmussen @kjellr - this PR is interesting to follow as it tries to solve the issue with navigating between the child and parent blocks. It would be great to align the approach between native and web mobile versions. |
Nice. So in current Gutenberg web it's super tricky to select parent blocks. We have for web two tickets to address this.
1 is what this PR seems to get at. The GIF (thanks so much for providing that!) suggests the implementation at the moment is a little barebones, that's fine. However would you be opposed to changing this behavior slightly so that instead of providing a gray popover with an up arrow in context of the selected block, you provide a bottom-fixed position gray popover with breadcrumbs inside? I believe I've seen a mockup from @iamthomasbishop showing this. The behavior would in effect be the same, only instead of an up arrow selecting the parent block, it would be the block icon of the parent block shown, in context of the block icon of the currently selected block. |
hi @jasmussen Thank for reply. There is also second PR which provide feature to navigate down in the hierarchy after each click/press. Also there are BreadCrumbs here and Hierarchy tree here provided by @dratwas We are putting this all together right know and after merge all we have got it should cover all what you wrote. |
@jasmussen As @jbinda mentioned, this is just one part of a wider nested blocks effort – it's based off this prototype I worked on a while back. With that in mind, our general approach is basically parent-first and this specific PR is facilitating the task of navigating from a nested child upward. Also a side-note: the |
Stellar! Love that, Thomas, thanks for sharing. All 👍 from me! |
I took I think it's look similar according to the figma example |
Awesome, that's exactly what I did in Figma 😄 I can also send an svg of the icon if need be, but that looks good to me! |
ok I will try to edit it and move 1px up |
It might look odd, but if you're already doing it let's give it a try and can revert if it doesn't look right 😄 |
That's how it look with opacity on right pipe |
@jbinda Perfect, thank you! Can you do me a favor and check what size the tap area for the |
Please check the screenshot from inspector: The tap area has exactly 44px :) |
Perfect! Thank you for checking. |
onClick={ () => this.props.onSelect( parentId ) } | ||
icon={ NavigateUpSVG } | ||
/> | ||
<View style={ styles.pipe } /> |
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 think this is fine for this one, but it should become the toolbar's border when we add the breadcrumbs
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 think this is looking good. I'm wondering if we should be showing the up button on top level blocks, since tapping on it seems to remove any selection.
@koke thanks for review ! According to what you wrote - this is known issue with FloatingToolbar and here @lukewalczak makes progress to fix it |
can I merge it then ? |
Yes, if that will be handled on another pr go ahead and merge |
Description
PR is connected with #1315 in gutenberg-mobile.
Please also refer to:
It presents
Icon
onFloating Toolbar
component witch allow to select parent of selected block. It is visible only when some of theInner Block
is selectedHow has this been tested?
Manual test on Android and iOS plus CI tests
Screenshots
Note here that selection frames and opacity will be applied in PR connected with this issue
Types of changes
Checklist: