-
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
Customize widgets, edit post: refactor Button to new sizes #65807
Changes from all commits
825f107
e247866
6094ebf
ff87070
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 |
---|---|---|
|
@@ -37,9 +37,7 @@ function Inserter( { setIsOpened } ) { | |
{ __( 'Add a block' ) } | ||
</h2> | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
className="customize-widgets-layout__inserter-panel-header-close-button" | ||
size="small" | ||
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. |
||
icon={ closeSmall } | ||
onClick={ () => setIsOpened( false ) } | ||
aria-label={ __( 'Close inserter' ) } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,7 @@ function FullscreenModeClose( { showTooltip, icon, href, initialPost } ) { | |
return ( | ||
<motion.div whileHover="expand"> | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
__next40pxDefaultSize | ||
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={ classes } | ||
href={ buttonHref } | ||
label={ buttonLabel } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,8 +82,7 @@ export default function InitPatternModal() { | |
/> | ||
<HStack justify="right"> | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
__next40pxDefaultSize | ||
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. |
||
variant="primary" | ||
type="submit" | ||
disabled={ ! title } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,9 +39,7 @@ export function CustomFieldsConfirmation( { willEnable } ) { | |
) } | ||
</p> | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
className="edit-post-preferences-modal__custom-fields-confirmation-button" | ||
__next40pxDefaultSize | ||
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. |
||
variant="secondary" | ||
isBusy={ isReloading } | ||
accessibleWhenDisabled | ||
|
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.
throw
somewhere in the package (Note: this button inherits some very generic style overrides, although this code is so legacy that we can probably keep it as-is without worrying too much.
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'm okay with the style overrides FWIW, but I think this is a perfect fit for the
size="compact"
, given the size of the neighbor buttons that are likely to not change in the future.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.
Makes sense — so, just to make sure, no changes needed for this instance since
size="compact"
is already being applied?The height doesn't look like the
compact
size because of the mentioned style overrides, which change (among other things) thebox-sizing
CSS property, causing the height of the button to be different than intended.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.
That's correct 👍
And whether we want to play with the style overrides in this PR in order to make the button height match better, I'll leave this to your judgment.
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'd leave it since it's a legacy part of the codebase, and this error screen should (hopefully) not be seen often by users 🤞