-
Notifications
You must be signed in to change notification settings - Fork 58
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 Down in the hierarchy #1314
Comments
Let's also address padding changes from this comment |
Hi 👋 To navigate down should we render separate icon next to 'navigate up' button ? Small Offtopic: I wrote this because some of the logic may relay on the logic that I need to implement to deal with navigation and wonder |
No need for that because navigating down should be available by just tapping. If you have chance to investigate the web version of any blocks that has InnerBlocks in it(like Group, Column, Media&Text) you can see that it has a parent first approach, when you first tap it focuses to the container block and if you tap again only then you’d be able to focus the child block inside it. We want the same thing on mobile. |
We don’t currently have sth in designs to move a single block upwards in the hierarchy but we have an ungroup functionality that needs to be added in the near future. Ungrouping can help but surely it is not the same thing so this can be a good enhancement. @iamthomasbishop But technically, ungrouping means changing the hierarchy of blocks so you can use this info when building any logic. But if this is still unclear please reach out with some more info about that logic you are planning to build so that we might be able to help better. |
I have obtain the logic on web and try to implement it as much similar as possible on mobile. I have also played with the opacity and dashed border when selecting Block which has some nested InnerBlocks. My question is what if we select e.g. image block which is on the same level with group block (and it is not the child of that group) We should also put opacity on the other blocks ? Or it is applied only when we select block with inner blocks inside ? |
@iamthomasbishop could you help with this one? 👆🏻 |
Let me ask one more question just to be sure. So even if there’s no nested block usage in the editor should we still use dimming ? Let’s say the editor has just pagargraph blocks in it, should we dim the unselected paragraph blocks? @iamthomasbishop |
No, if no blocks on the canvas contain children (no nesting) we shouldn't use dimming – at least for now. Although we should keep an eye on how this tests/feels when implemented, because it's something that could prove intuitive to add globally if appropriate. |
Ok thanks that was what i was thinking but just wanted to be sure. So for now we should use dimming only when someone selects an inner block. And we can decide if we want to make this global after trying it. |
@pinarol @iamthomasbishop can you take a look on this PR (WordPress/gutenberg#17547) with navigation down and check if the GIT presents the logic to dim blocks that we discussed above ? |
I have also question about design:
I have also issue with RichText editor (Heading and Paragraph block) because it goes to editing mode after press on it. Do you know there's a way to lock the editor and do not show the text-carret ? Then I would be able to select parent block first. Please see on GIF how it works for rest blocks |
There's a lot going on here, but in terms of padding, I believe the thought was that we should minimize or remove the padding on children to avoid so much whitespace (as discussed in this issue). I'm open to suggestions for how we'd achieve this (my thought was to add padding on the parent then slim down the children paddings so that the blocks don't move around on canvas – just the paddings/margins would adjust). If we do have to keep adding additional padding inside every level of the hierarchy, let's at least slim down the padding to be more managable.
I'm not exactly sure what you mean, it looks to me like top/bottom borders are fully-bordered in blue. Although I still noticed that the left/right borders aren't there (not unique to this issue), so we should definitely apply left/right borders to ensure consistency.
Do you mean the text input becomes active even though it's not yet the desired selected block? I'm not exactly sure what this looks like. |
That's what I've asked :) If I should apply left and right border
Yes, I presents it in my answer to the PR here I will also adjust the style according to what you wrote |
Awesome, thank you! |
I have fix this behaviour (big thanks to @lukewalczak for advise about give a try with I have also change the colour of the dashed border and apply left/right solid border when block is selected. Currently working on the margins and paddings. |
What value those margins should have ? The left/right border should be applied only for Group block or for other block as well ? |
Normally these changes should apply to all blocks which use InnerBlocks but since we don't have a good solution for #1362 yet let's limit it to Group block temporarily. Otherwise it can block merging Media & Text. |
@jbinda that definitely looks a lot better. It's already feeling much more clear. The border colors seem pretty solid, just strong enough but not overpowering. If this feels different in a live build I will make note of it during final design review, but looking nice.
The block contents optically should always be 16px, but the padding/margins should essentially adjust so that children appear inset. Here is a visual example: ⬆️ Top example is a normal "parent" block, and the bottom is child block of the parent. And note that the block content area (red highlight area) is the same size on both. So the contents of both of these blocks are inset 12/16px, but children are padded slightly differently so that they appear inset. Does that make sense? With that said, I wouldn't be opposed to applying a slight inset to the parent (blue border above) to make it even more obvious – something like 4px on the left/right sides would be fine. |
@iamthomasbishop I updated the borders and it looks as presented on below GIF. I still need to sort out the issue with margins on nested levels What do you think ?
I assumed that for other block the borders should like before which is without left/right part |
@jbinda Thanks for the updates! Overall, this is looking super close. The border styling is looking nice, although I have a couple of requests:
I also have a question regarding border positioning – are we applying border on the outside of each "box" or inside? The last example looks inside, which is fine, but I just want to make sure I'm on the same page, and if so we can apply an extra 1px inside (so that the border is optically on the outside)
This is the biggest thing remaining, I think. Ideally, all selected blocks should span of the container 100% width. This would essentially make all of the jumpiness go away, but the above demo certainly feels a lot better than previous iterations so we're on the right track. |
Sorry, I hit enter too soon 😄 Continuing feedback:
I'm not 100% sure what you mean here, but if I'm understanding you correctly, maybe removing the additional margins is the key? Also I'm open to seeing
I think all blocks in general should have left/right border but we already have a separate issue for that.
This is also slightly better, can you send a GIF of this in action, so I can see how much jumping is happening? |
@iamthomasbishop this is the GIF with latest. I have also adjust dashed-border rounding to 2px and include 1px extra margin to achieve visual effect which you described on the border. I have noticed that this "jumpy" effect appears when you select block group itself and keep working on it. |
@jbinda This is looking better with each iteration – I still think we should attempt to zero out the extra margins that are causing the jumpiness, but I think it's nearing the point where it's acceptable (even if imperfect). Can you tell me what the |
In given example: |
Ok, I'll apply this to my Figma styles, it looks rather nice. I'm fine with rolling with those border stylings. Side note (don't let this block your progress on this ticket): I like the 4/2 border-radii so much that I'm starting to think we might want to apply this style universally (4px border-radius to all selected blocks). It especially looks nice if we bring the left/right padding down to 12px and apply 4px left/right margins as I think was previously mentioned but paused. This can probably be tackled separately. For reference that would look like so: |
I have manage to change bahaviour of nested blocks. According to @iamthomasbishop said about margins in nested groups and this comment I have prepared below solution. Combination of dimmed content and dashed/solid border will give us the feeling and clearly show the structure without loosing width in rendering the content. Please check below GIF: Further more I said that will try to implement some animation and below I post 2 GIFs with animations: 1. Animate only on exit the block 2. Animate on enter/exit the block Please note that the type of animation as weel as the duration can by adjusted :) WDYT ? |
@jbinda Margins are much better. The animations feel a little odd in the two animated examples above. Some thoughts:
If none of the above feels better, we can ship with the first example you attached to your last comment (the non-animated one here. |
I also like the margins from 1st example :)
Yes it can be adjusted. I intentionally increase the timing in that case that you can observe what really happens
We can also switch the animation e.g. to fade In/Out instead of zoom In/Out
I also had been thinking about this animation yesterday and I agree that i needs to be polished (it was just initial concept to give you some feeling about that). Like you said I think we should ship this feature without animation and then is separate issue open a discussion and try to implement if we find something smooth and nice looking. |
User should be able to navigate downward in the hierarchy.
Please take a look at the prototype to get a sense of how it should behave.
Block Focus/Visual Cues
Transparency
You’ll notice below that the selected parent and all of its children are fully visible – everything outside of that is semi-transparent (in this example, 20% opacity). This helps to draw the eye to the current selection, without losing focus of the wider picture.
Selection Indication
A selected block that has children gets a strong focus border (blue) and each child on the next level gets a dotted outline that hints at what’s inside.
The text was updated successfully, but these errors were encountered: