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

Stack (Group block) variation: Explore hiding the wrap to multiple lines control #43218

Open
andrewserong opened this issue Aug 15, 2022 · 3 comments
Labels
[Block] Group Affects the Group Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.

Comments

@andrewserong
Copy link
Contributor

What problem does this address?

In the Stack variation of the Group block we currently display the "Allow to wrap to multiple lines" control. However, in the Stack variation, where elements are displayed in a vertical stack, this toggle doesn't appear to do anything since inner blocks are already arranged vertically.

image

What is your proposed solution?

Let's explore whether it would be helpful to hide the "Allow to wrap to multiple lines" toggle for the Stack variation.

Possible avenues for determining when to hide the control, as it is provided by the Layout block support:

  • Should we hide it when the Flex layout uses a vertical orientation? Or, are there cases for other blocks where this will do something.
  • If it shouldn't be hidden for vertical orientations for all blocks, do we need to somehow check that the variation supports this value?
@andrewserong andrewserong added [Block] Group Affects the Group Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Aug 15, 2022
@jasmussen
Copy link
Contributor

jasmussen commented Aug 15, 2022

Good ticket. While the control is immensely useful for horizontal containers, it definitely seems less so for the stack.

One of the challenges with this control is that it has massive prominence in the inspector, but probably it isn't something you should touch most of the time. In the past we handled similar situations with the ToolsPanel, allowing the control to exist for a block, but be hidden by default. Is that something which might work for these blocks as well?

@andrewserong
Copy link
Contributor Author

Thanks! Switching over to the ToolsPanel could be a useful idea for the future, particularly for hiding the content and wide size controls by default, which @tellthemachines has mentioned (and seems to link nicely to #36082).

After thinking about this a little further, it'd actually be useful for the Stack (or one day possibly Cover block) to still have this toggle available, if it was using a fixed height. E.g. imagine a Stack block with a height block support control, where you could set a fixed height, and then have child blocks that reach that height then wrap around to another column.

For the moment, I think maybe let's leave the control visible as-is, since Stack defaults to it being switched on to wrap, and we could re-visit when we look at height block support again.

@jasmussen
Copy link
Contributor

The tools panel would allow the control to be available on both, if reduced in prominence by not being shown by default 👍

@andrewserong andrewserong added the [Feature] Layout Layout block support, its UI controls, and style output. label Oct 26, 2022
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Layout Layout block support, its UI controls, and style output. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants