-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
PaletteEdit: Add appropriate size props to Buttons #66590
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,7 @@ function Option< T extends PaletteElement >( { | |
<Item ref={ setPopoverAnchor } size="small"> | ||
<HStack justify="flex-start"> | ||
<Button | ||
size="small" | ||
onClick={ () => { | ||
setIsEditingColor( true ); | ||
} } | ||
|
@@ -501,6 +502,7 @@ export function PaletteEdit( { | |
<NavigableMenu role="menu"> | ||
{ ! isEditing && ( | ||
<Button | ||
__next40pxDefaultSize | ||
variant="tertiary" | ||
onClick={ () => { | ||
setIsEditing( true ); | ||
|
@@ -513,6 +515,7 @@ export function PaletteEdit( { | |
) } | ||
{ ! canOnlyChangeValues && ( | ||
<Button | ||
__next40pxDefaultSize | ||
variant="tertiary" | ||
onClick={ () => { | ||
setEditingElement( | ||
|
@@ -535,6 +538,8 @@ export function PaletteEdit( { | |
) } | ||
{ canReset && ( | ||
<Button | ||
__next40pxDefaultSize | ||
className="components-palette-edit__menu-button" | ||
Comment on lines
+541
to
+542
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Classname addition makes sense to resolve this. I just wonder if these buttons make sense to be menu items instead of buttons? Not something to block the PR of course. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, it looks like this could be a DropdownMenu. @ciampo Should we add any new dropdown instances using DropdownMenuV2, or should we still use v1 until it's a bit more stable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep v1 for now, but use this as a place where we can use v2 soon (probably as soon as #66383 is merged) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to #61094 |
||
variant="tertiary" | ||
onClick={ () => { | ||
setEditingElement( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell if there's any intentionality to the height of these rows. @WordPress/gutenberg-design Is the natural height resulting from this fix acceptable, or do we want to maintain a certain row height?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This predates my involvement so I can't comment with confidence on the intentionality. Aiming for
40px
rows seems acceptable to me though.This whole UI likely needs to be revisited and standardised at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's leave it like this for now until we have time to revisit.