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

List: Add inspector interface to choose bullet or number type #51480

Open
jasmussen opened this issue Jun 14, 2023 · 9 comments
Open

List: Add inspector interface to choose bullet or number type #51480

jasmussen opened this issue Jun 14, 2023 · 9 comments
Labels
[Block] List Affects the List Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

jasmussen commented Jun 14, 2023

#51186 adds an option to choose number types in the inspector. While the feature can land soon, we have an opportunity here to improve the interface in a few ways:

  • Add more features, such as number selector, color
  • Add similar options to the ordered list option
  • Size and alignment options for bullets
  • Improve compactness of the controls, making sure their value matches their prominence

In addition to that, we can make likely make the control into a style control, so that it doesn't split the inspector by adding just a single panel. All of this we can likely accomplish with a flyout menu pattern, like so, shown here for unordered list:
Unordered list items i4

  • The flyout would contain controls for selecting the bullet type (circle, square, diamond, dash)
  • A color option
  • A size and alignment option

Similarly we can apply the same pattern for ordered lists:

Ordered list items i1
  • The flyout would absorb existing controls for reverse order and starting value
  • It would add a type selector (numbered, lettered, roman numerals)
  • A color option
  • A size option

What do you think?

Related: a similar flyout interface for the Paragraph block in #51481.

@jasmussen jasmussen added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Block] List Affects the List Block labels Jun 14, 2023
@hanneslsm
Copy link

hanneslsm commented Jun 14, 2023

I wouldn't distinguish between ordered and unordered list then anymore. Of core, the code should be ol or ul when numbers or bullets are used, but for the user it's irrelevant. Let's combine both.
Here is a very quick sketch on how this could look like.
image

Edit:
I'm reverting.
MS Word has also two icons for unordered and ordered list (even three, for mixed). Yeah… let's keep them separate. :)

@jasmussen
Copy link
Contributor Author

Good thoughts. I actually think both can work, but also that it's one of those issues that can be hashed out in implementation.

@beafialho
Copy link

This is great.

I was wondering if this would also apply to the Categories List block? If so, for that specific case, it would be useful to be able to have no bullet, symbol or spacing behind the list items. For instance, on sidebars, we may want to showcase categories lists with a different stylistic treatment, and the bullets often add visual noise. Here's an example:

Captura de ecrã 2023-06-19, às 12 54 21

@jasmussen
Copy link
Contributor Author

It seems like we should be able to copy over that same list item inspector control to a typography panel for the categories list block, yes. All the more reason that it's good for it to be compact.

@MaggieCabrera
Copy link
Contributor

All of this should also be applied to the details block too :D

@jasmussen
Copy link
Contributor Author

All of this should also be applied to the details block too :D

Do you mean in terms of changing the chevron? I'd love to provide options there, but we always get stuck at limitations in the base element. Are there new options for changing the icon?

@MaggieCabrera
Copy link
Contributor

All of this should also be applied to the details block too :D

Do you mean in terms of changing the chevron? I'd love to provide options there, but we always get stuck at limitations in the base element. Are there new options for changing the icon?

It's certainly limited, but some CSS can be used. This is what we did in TT4, not the prettiest thing but I wanted to avoid too much CSS.

@jasmussen
Copy link
Contributor Author

Nice, that works. It doesn't animate, though, and remains somewhat non-standard, so I wonder if the same interface will work here 🤔

@MaggieCabrera
Copy link
Contributor

Nice, that works. It doesn't animate, though, and remains somewhat non-standard, so I wonder if the same interface will work here 🤔

Using pseudo-elements will give us more control than that, but I didn't want to overcomplicate things in the theme, that's why I quickly came here to mention we could support that better from the block directly instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants