-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Button: Add __next40pxDefaultSize
in dataviews, reusable-blocks, etc.
#65715
Conversation
label={ __( 'Close' ) } | ||
icon={ closeSmall } | ||
onClick={ onClose } | ||
size="small" |
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.
@@ -44,16 +44,3 @@ | |||
.dataforms-layouts-panel__dropdown-header { | |||
margin-bottom: $grid-unit-20; | |||
} | |||
|
|||
[class].dataforms-layouts-panel__dropdown-header-action { |
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.
Removing this CSS because nothing else is using this class.
size="compact" | ||
className="list-reusable-blocks-import-dropdown__button" |
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.
// Todo: Make core button height and gutenberg button height equal. | ||
.components-button { | ||
height: 26px; | ||
} |
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.
Moved to a custom class name in packages/list-reusable-blocks/src/components/import-dropdown/style.scss
.
@@ -1,3 +1,8 @@ | |||
.list-reusable-blocks-import-dropdown__content .components-popover__content { | |||
padding: 10px; | |||
} | |||
|
|||
[class].list-reusable-blocks-import-dropdown__button { |
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.
[class]
selector added for more specificity.
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.
It's a bummer this is necessary, but it makes sense since the other button is outside our control.
@@ -84,8 +84,7 @@ function ImportForm( { instanceId, onUpload } ) { | |||
</label> | |||
<input id={ inputId } type="file" onChange={ onChangeFile } /> | |||
<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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm, it's a tough call! I agree the compact size looks much more harmonious in the current state, but also I believe the wp-admin pages are going to slowly migrate to the React componentry eventually. In that case, we will be adding tech debt by setting an explicit "compact"
here, as that doesn't adhere to the design system guidelines. I think I slightly prefer the path of least resistance (i.e. default size), since everything is kinda wonky anyway? 😅
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.
You have a point about adding tech debt if we pick a different size.
I wish we could fix both the top buttons right here and right now, but it's a bigger can of worms.
@@ -5,7 +5,6 @@ | |||
|
|||
.list-reusable-blocks-import-form__button { | |||
margin-top: 10px; | |||
margin-bottom: 10px; |
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.
Removed unnecessary margin bottom.
@@ -57,17 +57,15 @@ export function DotTip( { | |||
<p>{ children }</p> | |||
<p> | |||
<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 comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -191,8 +191,7 @@ export default function ReusableBlockConvertButton( { | |||
/> | |||
<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 comment
The reason will be displayed to describe this comment to others. Learn more.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +640 B (+0.04%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
Looks great, thanks @mirka 👍
I only have second thoughts about the instance where we change the pattern import popover button height. See my inline comment for more details.
@@ -1,3 +1,8 @@ | |||
.list-reusable-blocks-import-dropdown__content .components-popover__content { | |||
padding: 10px; | |||
} | |||
|
|||
[class].list-reusable-blocks-import-dropdown__button { |
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.
It's a bummer this is necessary, but it makes sense since the other button is outside our control.
@@ -84,8 +84,7 @@ function ImportForm( { instanceId, onUpload } ) { | |||
</label> | |||
<input id={ inputId } type="file" onChange={ onChangeFile } /> | |||
<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 comment
The reason will be displayed to describe this comment to others. Learn more.
variant="link" | ||
onClick={ onDismiss } | ||
> | ||
{ hasNextTip ? __( 'See next tip' ) : __( 'Got it' ) } | ||
</Button> | ||
</p> | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
size="small" |
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.
We'll also need to update the test snapshots here.
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.
Looks great, let's go, thanks @mirka 🚀
…c. (#65715) * Fix in Dataforms layouts * Fix in Patterns header * Fix in Patterns import popover * Fix in nux * Fix in ReusableBlockConvertButton * Update snapshot Co-authored-by: mirka <[email protected]> Co-authored-by: tyxla <[email protected]>
…c. (WordPress#65715) * Fix in Dataforms layouts * Fix in Patterns header * Fix in Patterns import popover * Fix in nux * Fix in ReusableBlockConvertButton * Update snapshot Co-authored-by: mirka <[email protected]> Co-authored-by: tyxla <[email protected]>
…ocks, etc. (WordPress#65715)" This reverts commit 419a418.
Part of #65018
What?
Adds the
__next40pxDefaultSize
prop to Buttons in the following packages:dataviews
list-reusable-blocks
nux
reusable-blocks