-
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
Try: Align widget sidebar button. #32738
Conversation
Size Change: +15 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
|
||
.dashicon { | ||
display: inline-block; | ||
flex: 0 0 auto; | ||
} | ||
|
||
// Pull left if the tertiary button stands alone after a description, so as to vertically align with items above. |
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 seems strange that the styles of a button depend on if the button follows a paragraph or not. Is this change something that should happen all the time if before the button there is a paragraph?
For the other button styles would this change or something similar also make sense?
What if instead of adding these styles to the button we add them to the container of the description and button (widget areas block)?
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 thing is, the tertiary button has a built-in padding of 6px, which means it needs the similar negative margin only if it stands on its own. In the Image block example shown (primary, tertiary, tertiary) the button should not have negative margin.
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.
Thank you for the clarification 👍
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.
This change, although very specific, is helpful for various "card" like contents. I say ✅
@jasmussen what do you say about moving this link to the head of the editor, somewhere next to the update button or similar? |
Thank you for the review!
I think part of the reason why I think the sidebar, and for a tertiary style for this button, is to manage the prominence. You can find it if you need it, but I don't think it should have increased prominence because it's such a different interaction and interface. If the codebase for widgets was different, making it more of a direct split screen toggle rather than a jarring shift loading an entirely new webpage, the top toolbar could make more sense. |
Description
Very small improvement to the Button component, specifically the tertiary style, so that it aligns vertically if shown next to a description. For example in the new widgets editor, before:
After:
How has this been tested?
This negative margin for alignment should only apply in the right contexts. In my testing, it does, but please look for any tertiaty buttons that look pulled left when they shouldn't be.
Checklist:
*.native.js
files for terms that need renaming or removal).