Skip to content
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

Inner Blocks - Navigating Upward in the hierarchy #1315

Closed
pinarol opened this issue Aug 22, 2019 · 4 comments · Fixed by #1371
Closed

Inner Blocks - Navigating Upward in the hierarchy #1315

pinarol opened this issue Aug 22, 2019 · 4 comments · Fixed by #1371
Assignees
Labels
InnerBlocks [Type] Enhancement Improves a current area of the editor

Comments

@pinarol
Copy link
Contributor

pinarol commented Aug 22, 2019

User should be able to navigate upward in the hierarchy.

Please take a look at the prototype to get a sense of how it should behave.

User should be able to navigate upward in the hierarchy by tapping the Up button inside the floating toolbar.

Screen Shot 2019-08-22 at 21 28 04

@pinarol
Copy link
Contributor Author

pinarol commented Sep 4, 2019

Linking this comment here since it contains relevant discussion.

Especially this part:

Considering the upcoming work to implement a hierarchy navigation toolbar, I think we should go one of two routes. Either:

- Slim down the additional margins to ~4-8px left/right (this would lessen the problem, but not fix it)
- Remove the additional margins completely (this would mean all blocks – nested or not – would be full-width, but wouldn't provide as much a visual cue of hierarchy)

If there are other suggestions, I'm all ears.

Hard to tell before using, I think we can do both and compare as an experiment 🤔

@jbinda
Copy link
Contributor

jbinda commented Sep 16, 2019

Hello 👋

What should be correct order during navigating to the top ?
Let's say I have below structure:

`

<!-- wp:image_root -->
<!-- wp:heading_root -->

    <!-- wp:group1_root -->
        <!-- wp:image_g1 -->
        <!-- wp:heading_g1 -->
    <!-- /wp:group1_root -->

<!-- wp:video_root  -->

    <!-- wp:group2_root -->
        <!-- wp:heading_g2 -->
        <!-- wp:paragraph_g2 --> **current selection
    <!-- /wp:group2_root -->

`

the order of the selections will be:
wp:heading_g2 -> wp:group2_root -> wp:video_root -> wp:heading_g1 -> wp:image_g1 -> wp:group1_root -> wp:heading_root -> wp:image_root

is that correct ?

@jbinda jbinda self-assigned this Sep 16, 2019
@pinarol
Copy link
Contributor Author

pinarol commented Sep 16, 2019

Navigating upward is necessary only in case the block has inner blocks, we expect navigating upward would set the focus to the block’s parent. The order would be just:
paragraph_g2 -> group2
If I understand the example right, group2 doesn’t have a parent so there’s nowhere else to navigate in upwards direction at that point.

@jbinda
Copy link
Contributor

jbinda commented Sep 18, 2019

Ok, thanks - I will raise an PR soon and let you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
InnerBlocks [Type] Enhancement Improves a current area of the editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants