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

Iterations on "Absorb Toolbar" mechanisms #26313

Closed
mtias opened this issue Oct 20, 2020 · 11 comments
Closed

Iterations on "Absorb Toolbar" mechanisms #26313

mtias opened this issue Oct 20, 2020 · 11 comments
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@mtias
Copy link
Member

mtias commented Oct 20, 2020

One apparent difficulty that has risen with more and more blocks leveraging child blocks for controls (Buttons, Social Icons, Navigation, etc) is a general lack of intuitiveness when it comes to modifying attributes of the parent. Example: changing the alignment of Buttons when editing a single Button; changing the color of Navigation (a parent block attribute) when editing a single Navigation Item.

To address this, I'd like to explore ideas around when and how the toolbar and sidebar controls of a parent block could be exposed on their children. There are many challenges around clarity to overcome. This should not be a default true property, since groupings like Group, Columns, Cover, etc, should not present this behaviour.

@mtias mtias added [Feature] Blocks Overall functionality of blocks Needs Design Needs design efforts. [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P labels Oct 20, 2020
@rickybanister
Copy link

rickybanister commented Oct 20, 2020

I feel like there's a lot of opportunity to improve the parent selector. Something I find unintuitive about it now is that clicking on the selector then swaps the child toolbar for the parent toolbar in the original location.

Screen Recording 2020-10-20 at 12 01 45 PM

I might find it more intuitive if the parent selector expanded to become the parent toolbar. I also realize it lives above the standard toolbar location which would introduce another problem, but perhaps an animation from the parent selector location to the standard toolbar location could help?

@mapk
Copy link
Contributor

mapk commented Nov 12, 2020

Looking at the Nav, Buttons, and Social Links blocks, which parent controls do we want to be accessible from the child block? Is this a boolean operation that either includes these controls in the child block, or should each control be marked individually to include?

Here's the block toolbars for each of those (parent on top, child block on bottom).

Navigation block
Parent block controls: Width, Alignment, and Block Navigator.

Screen Shot 2020-11-11 at 5 03 19 PM

Buttons block
Parent block controls: Width and Alignment.

Screen Shot 2020-11-11 at 5 05 18 PM

Social Links block
Parent block controls: Width and Size.

Screen Shot 2020-11-11 at 5 06 08 PM

These designs still need plenty of iterations.

Ideas

Perhaps something as simple as showing those parent controls in the child block's toolbar. More iterations can be done around whether or not the parent controls should be visually different than the child block's controls to help differentiate them. But maybe this isn't necessary.

quick

Another idea could be around animating the transition in the vein of @rickybanister's idea above. But I don't think this would work as well for accessibility.

animate

@jasmussen
Copy link
Contributor

In a related conversation, I shared some initial mockups for how the parent selector button could stay in context of the parent block, along with a boundary indication. It needs a little more thinking, but the heuristic seems like might work, as it's always just about the child and its immediate parent.

@mapk
Copy link
Contributor

mapk commented Nov 30, 2020

Thanks for sharing that, Joen. The 3rd option felt the best to me. I didn't care for the offset stacked toolbar when the top child elements was selected. Having them on the same line is stronger.

@rickybanister
Copy link

@jasmussen yes, the third idea is a wonderful expansion on what I was trying to communicate above.

@ZebulanStanphill
Copy link
Member

Thanks for sharing that, Joen. The 3rd option felt the best to me. I didn't care for the offset stacked toolbar when the top child elements was selected. Having them on the same line is stronger.

The 3rd option did seem cool, but I don't see how it is even possible, from a technical perspective. How do you determine when to place the child toolbar to the side of the parent toolbar? The mockup has the very convenient case of the first child starting at the same point on the Y axis as the parent block. But what if the first child is further down due to a large amount of padding on the parent? This sounds like something that would take some complicated JS styling to pull off, which raises red flags to me.

@jasmussen
Copy link
Contributor

This sounds like something that would take some complicated JS styling to pull off, which raises red flags to me.

The benefit of doing this in mockup form is that we aren't necessarily beholden to what's possible, but might simply spark new ideas or solutions we didn't think of (float: left; to the rescue?). I intentionally try to also explore things I know to be likely to not work, so as to not leave that stone unturned.

Worst case, we can get a visual feel for it, decide it's too onerous to implement, and we can point back to the conversation when someone in the future asks: "why didn't you try n". We'll have cauterized that idea, knowing it didn't work for us.

@gziolo gziolo self-assigned this Jul 10, 2021
@gziolo gziolo added the [Status] In Progress Tracking issues with work in progress label Jul 10, 2021
@gziolo
Copy link
Member

gziolo commented Jul 10, 2021

I plan to work on further iterations for this mechanism.

Prior work can be found in #18440 PR. There is __experimentalCaptureToolbars experimental prop used with the Navigation block.

@gziolo
Copy link
Member

gziolo commented Aug 9, 2021

I have a first working prototype #33955 for absorbing parent inspector controls. It works pretty nicely with the Buttons block. It sort of work with the Social Icons block, but I need to further investigate whether there wasn't any regression in that block.

@gziolo
Copy link
Member

gziolo commented May 7, 2022

I haven’t made any progress since the last update so I unassigned myself in case someone wants to take it over.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 1, 2023
@mtias
Copy link
Member Author

mtias commented Sep 29, 2024

There's nothing very concrete here, so closing for now. The content-only mode is a more thorough version of this anyways.

@mtias mtias closed this as completed Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants