-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Button: Add __next40pxDefaultSize in dataviews, reusable-blocks, etc.
#65715
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
Changes from all commits
266d609
cdc56a7
1509a20
69affc9
848ff10
8b642e0
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 |
|---|---|---|
|
|
@@ -44,16 +44,3 @@ | |
| .dataforms-layouts-panel__dropdown-header { | ||
| margin-bottom: $grid-unit-20; | ||
| } | ||
|
|
||
| [class].dataforms-layouts-panel__dropdown-header-action { | ||
|
Member
Author
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. Removing this CSS because nothing else is using this class. |
||
| height: $icon-size; | ||
|
|
||
| &.has-icon { | ||
| min-width: $icon-size; | ||
| padding: 0; | ||
| } | ||
|
|
||
| &:not(.has-icon) { | ||
| text-decoration: underline; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,8 @@ function ImportDropdown( { onUpload } ) { | |
| contentClassName="list-reusable-blocks-import-dropdown__content" | ||
| renderToggle={ ( { isOpen, onToggle } ) => ( | ||
| <Button | ||
| // TODO: Switch to `true` (40px size) if possible | ||
| __next40pxDefaultSize={ false } | ||
| size="compact" | ||
| className="list-reusable-blocks-import-dropdown__button" | ||
|
Comment on lines
+20
to
+21
Member
Author
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. |
||
| aria-expanded={ isOpen } | ||
| onClick={ onToggle } | ||
| variant="primary" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| .list-reusable-blocks-import-dropdown__content .components-popover__content { | ||
| padding: 10px; | ||
| } | ||
|
|
||
| [class].list-reusable-blocks-import-dropdown__button { | ||
|
Member
Author
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.
Member
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. It's a bummer this is necessary, but it makes sense since the other button is outside our control. |
||
| // Todo: Make core button height and gutenberg button height equal. | ||
| height: 30px; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
Author
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.
Member
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.
Member
Author
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. 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
Member
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. 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. |
||
| type="submit" | ||
| isBusy={ isLoading } | ||
| accessibleWhenDisabled | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,6 @@ | |
|
|
||
| .list-reusable-blocks-import-form__button { | ||
| margin-top: 10px; | ||
| margin-bottom: 10px; | ||
|
Member
Author
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. Removed unnecessary margin bottom. |
||
| float: right; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,6 @@ | |
| align-items: center; | ||
| position: relative; | ||
| top: -3px; | ||
| // Todo: Make core button height and gutenberg button height equal. | ||
| .components-button { | ||
| height: 26px; | ||
| } | ||
|
Comment on lines
-9
to
-12
Member
Author
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. Moved to a custom class name in |
||
| } | ||
|
|
||
| @include wordpress-admin-schemes(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,17 +57,15 @@ export function DotTip( { | |
| <p>{ children }</p> | ||
| <p> | ||
| <Button | ||
| // TODO: Switch to `true` (40px size) if possible | ||
| __next40pxDefaultSize={ false } | ||
| __next40pxDefaultSize | ||
|
Member
Author
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="link" | ||
| onClick={ onDismiss } | ||
| > | ||
| { hasNextTip ? __( 'See next tip' ) : __( 'Got it' ) } | ||
| </Button> | ||
| </p> | ||
| <Button | ||
| // TODO: Switch to `true` (40px size) if possible | ||
| __next40pxDefaultSize={ false } | ||
| size="small" | ||
|
Member
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. We'll also need to update the test snapshots here. |
||
| className="nux-dot-tip__disable" | ||
| icon={ close } | ||
| label={ __( 'Disable tips' ) } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,8 +191,7 @@ export default function ReusableBlockConvertButton( { | |
| /> | ||
| <HStack justify="right"> | ||
| <Button | ||
| // TODO: Switch to `true` (40px size) if possible | ||
| __next40pxDefaultSize={ false } | ||
| __next40pxDefaultSize | ||
|
Member
Author
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="tertiary" | ||
| onClick={ () => { | ||
| setIsModalOpen( false ); | ||
|
|
@@ -203,8 +202,7 @@ export default function ReusableBlockConvertButton( { | |
| </Button> | ||
|
|
||
| <Button | ||
| // TODO: Switch to `true` (40px size) if possible | ||
| __next40pxDefaultSize={ false } | ||
| __next40pxDefaultSize | ||
| variant="primary" | ||
| type="submit" | ||
| > | ||
|
|
||






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.
Enable the "Quick Edit in DataViews" experiment. Go to the list of Pages in Site Editor and enable the Table view. Toggle the details panel to the right, and click on a field to show the edit popover.
No visual changes: