-
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
Add props for buttons in editor 2 #65083
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 |
---|---|---|
|
@@ -36,8 +36,7 @@ function PostLastRevision() { | |
return ( | ||
<PostLastRevisionCheck> | ||
<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. I wasn't able to find how to test this instance in the editor — it looks like the In any case, I can see that there are some style overrides in place that tweak the For the scope of this PR, I think that we can leave things as they are. As a future improvement, we should avoid overriding button (and panel) styles. If we feel like we're tweaking 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. Yeah, this component is not used any more in favor of 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. I think it still makes sense to remove the overrides if possible. 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. Agreed — it would be good to do that as a follow up to this PR. 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. A follow-up PR sounds good 👍 |
||
href={ addQueryArgs( 'revision.php', { | ||
revision: lastRevisionId, | ||
} ) } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,17 +257,15 @@ export default function PostLockedModal() { | |
> | ||
{ ! isTakeover && ( | ||
<Button | ||
// TODO: Switch to `true` (40px size) if possible | ||
__next40pxDefaultSize={ false } | ||
__next40pxDefaultSize | ||
variant="tertiary" | ||
href={ unlockUrl } | ||
> | ||
{ __( 'Take over' ) } | ||
</Button> | ||
) } | ||
<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" | ||
href={ allPostsUrl } | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,7 @@ const PostFormatSuggestion = ( { | |
onUpdatePostFormat, | ||
} ) => ( | ||
<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. 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={ () => onUpdatePostFormat( suggestedPostFormat ) } | ||
> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,8 +155,7 @@ export default function PostFormatPanel() { | |
<Spinner /> | ||
) : ( | ||
<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" | ||
onClick={ uploadImages } | ||
> | ||
|
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.
As @mirka mentioned in another PR,
variant="link"
Button
components have their height set toauto
, and therefore the__next40pxDefaultSize
doesn't make any difference