-
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
Site Editor: Tweak save hub button #58917
Conversation
Size Change: +15 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
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. |
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.
thanks for sweating the details @t-hamano ! Looks like a good improvement to me.
@SaxonF Thanks for the review! |
Apologies for being late to this. On a consistency perspective, a trade-off was not considered here, which is that in the resting state which you see most of the time, the alignment will be wrong: I understand the balance: that when the primary save button transforms into the disabled "saved" state, it's awkward that the text moves to the left. I think there are more general improvements we can look at, in that flow, to address it, including potentially reducing the prominence of the "Saved" state, adding some fades or otherwise. But keeping it centered makes things look out of alignment most of the time. |
Part of #46734
What?
This PR makes the following changes to the save button at the bottom left of the site editor:
Why?
This button is a common component (
SaveButton
) that is also used in the header, and the component itself hassize="compact"
. So even if you give it the__next40pxDefaultSize
prop and use this component, it might end up being 32px tall instead of 40px.Also, this component should expect the text to be horizontally centered. However, if this component is disabled, i.e. has a check icon, the Button component's selector for left-aligning text is more specific, as shown below, overriding the left-right center style.
How?
size
prop that was hard-coded in theSaveButton
component is received as a component prop.Testing Instructions