Open ciampo opened 3 years ago
What would be the purpose of the organizational unit for grouping ItemGroups
? Trying to understand what it'd represent.
Should the tooltip be on each ColorSwatch component?
As a general rule, tooltips should be applied to actionable items. So if the entire Item is the action, the tooltip should be general: "Link color red; hover color blue" or something.
What would be the purpose of the organizational unit for grouping ItemGroups? Trying to understand what it'd represent.
This is a screenshot from an early version of the Global Styles Sidebar prototype — here there are 2 different ItemGroup
s components, grouped under the "Palette" and "Elements" headers.
In that older prototype version, those ItemGroup
s were groups using a component called ListGroup
, which currently doesn't exist in Gutenberg. When trying to move that earlier prototype to Gutenberg (#32923), tyxla
used instead the Panel
component (for lack of a better alternative)
These are the reasons behind the current state of the Grouping ItemGroups
section in the description. Do you have any suggestions/insights on the best direction to take here?
As a general rule, tooltips should be applied to actionable items. So if the entire Item is the action, the tooltip should be general: "Link color red; hover color blue" or something.
That makes sense. In this case, then, we should definitely think about the best way for ItemGroup
to support tooltips for each Item
.
We should probably also add tooltip support for the future ColorSwatch
component — although this tooltip won't be used when the ColorSwatch
is used inside of an ItemGroup
(we're going to use the Item
's tooltip instead)
It seems to me ItemGroup
with a title prop, a heading sibling, or a heading child should be sufficient? Not sure I see why it'd need an extra layer of componetry since the group is already defined.
It seems to me ItemGroup with a title prop, a heading sibling, or a heading child should be sufficient? Not sure I see why it'd need an extra layer of componetry since the group is already defined.
This makes sense — we don't have to necessarily group ItemGroup
components the same way they were grouped in the early prototype. I've updated this issue's description with what's been discussed and agreed upon in the last exchange.
This is an overview issue to track all of the tasks necessary to refine the
ItemGroup
component in the context of integrating with the new design and primitives.ItemGroup
andItem
Heading
toItemGrop
(and to link it in a semantic way as the title of the group)@wordpress/components
Button
element instead of vanilla HTMLbutton
Item
(how would that work with screen readers? e.g. consider making sure that theItem
's computed "aria-label` is the same text used in the tooltip)Item
to be a direct child ofItemGroup
(examples of where that fell short: https://github.com/WordPress/gutenberg/pull/37067#discussion_r761807702 , https://github.com/WordPress/gutenberg/pull/37546#discussion_r784263364)ul
/li
) (comment)Integration with other components
Item
Truncate
changes color when hovered/focused, while text insideText
doesn'tItemGroup
in combination with other components