-
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
Editor: Align the Post Format control design with the rest of the post sidebar controls #62066
Conversation
…t sidebar controls
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: +549 B (+0.03%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
To avoid introducing too many extra clicks I think ideally we'd move to something more like the Status dialog, IE radios rather than a select. I appreciate that might be a detail to work on separately though. If we keep the select for now, would it make sense to auto-focus the select when the dialog is opened? Also could it be 40px rather than 32px, to match the other Inspector inputs? |
I updated the dropdown to use RadioControl like the post status one. |
|
||
.editor-post-format__options { | ||
.components-base-control__field > .components-v-stack { | ||
gap: $grid-unit-15; |
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 gap between radio options is way too small by default in RadioControl, I wonder if this style should be something to elevate to the components package. cc @mirka
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.
In progress at #61696
) } | ||
onClick={ onToggle } | ||
> | ||
{ activeFormat?.caption } |
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.
Can this be in any case not defined? I think not, but if yes, it will just render an 'empty' button here which would make no much sense, would it?
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.
In theory no, if you change in the UI but this is just defensive coding I guess to avoid breaking the editor if some plugin does something weird in editEntityRecord.
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.
Code wise this looks good. Thanks!
…t sidebar controls (WordPress#62066) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]>
…t sidebar controls (WordPress#62066) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]>
What?
Looking at the design of the Post Format control in the post editor sidebar, it looks out of place compared to the other controls. This PR tries to bring some harmony there and just applies the same behavior we have for Post Author for instance.
Before:
After:
Testing Instructions