-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: update button block #91
Conversation
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 works as described! The one issue I noticed is that the outline version of the X-Small button does not have the same padding decrease as the regular version:
Also, more of a personal preference (so not a blocker), but I'm a little leery about this change because it overrides how the controls should work, but not in a not-obvious way (compared to if we could just remove the X-Small option for this specific block). It also may have wider implications for other button elements -- for example, the Checkout Block has the same font size control, should it act the same way?
The button still does visually change in size, so most pubs would probably not notice -- so take this with a grain of salt! But I'd like to avoid introducing things we'd have to override with CSS to change if at all possible! 🙂
Fixed in eab7933. It's not ideal because I'm using
X-Small is too small to use for content/buttons. It should only be used for secondary/tertiary text like meta or captions. That being said, relying on X-Small gives us an option to create a smaller button without the need for a custom class/style. This type of button should, for example, be used in the header ('Donate').
All the buttons should behave the same. Does the Checkout block use a different Button 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.
X-Small is too small to use for content/buttons. It should only be used for secondary/tertiary text like meta or captions. That being said, relying on X-Small gives us an option to create a smaller button without the need for a custom class/style. This type of button should, for example, be used in the header ('Donate').
That's fair -- and it is override-able if need be. Every so often something like this will come back from a user if something doesn't work as expected, but we'll have to document the heck out of this theme so TAMs are equipped to use the options, as well as pubs -- we can make sure to cover stuff like this there, so at least we're all on the same page with how specific things work and why 🙂
All the buttons should behave the same. Does the Checkout block use a different Button block?
The markup isn't 1:1 -- the Checkout Block uses the .wp-block-button__link
class, but it doesn't have the .wp-block-button
wrapper class like the Button block does, so it doesn't pick up everything. I tested briefly and it seems to pick up the color/font, but not the right padding (weirdly they match in the editor, though):
I think we might need to repeat this bit in the theme.json for that block just to get the default styles consistent, and then repeat the same padding/sizing stuff in the CSS for the smaller font size. But this is something that could be done separately -- this isn't the only thing we're going to have to look at for the Newspack Blocks plugin, it'd be nice not to be fixing stuff piecemeal.
Anyway, the update looks good, the button looks consistent using the different sizes!
This is good to know. I will need to take a proper look at the block then! |
# [1.5.0-alpha.1](v1.4.0...v1.5.0-alpha.1) (2024-01-26) ### Bug Fixes * parenthesis ([a0c485f](a0c485f)) * remove link from post date archive ([#90](#90)) ([d08ba5e](d08ba5e)) ### Features * add 2x-small font size ([#102](#102)) ([cb17fdc](cb17fdc)) * add new "Paul" style ([#88](#88)) ([5605dab](5605dab)) * update archive template ([#89](#89)) ([3c8556d](3c8556d)) * update button block ([#91](#91)) ([b66f75a](b66f75a)) * update button style ([#103](#103)) ([4b686f9](4b686f9)) * update desktop header template part ([#106](#106)) ([b5d45ba](b5d45ba)) * update footer part and lock blocks ([#105](#105)) ([0490354](0490354)) * update grid and typography ([64c70d7](64c70d7)) * update grid and typography ([f5073ef](f5073ef)) * update svg icons and search overlay ([#111](#111)) ([9ee5b6a](9ee5b6a)) * update the query pagination block ([#93](#93)) ([03e7fb6](03e7fb6))
🎉 This PR is included in version 1.5.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.5.0](v1.4.0...v1.5.0) (2024-02-06) ### Bug Fixes * parenthesis ([a0c485f](a0c485f)) * remove link from post date archive ([#90](#90)) ([d08ba5e](d08ba5e)) ### Features * add 2x-small font size ([#102](#102)) ([cb17fdc](cb17fdc)) * add new "Paul" style ([#88](#88)) ([5605dab](5605dab)) * update archive template ([#89](#89)) ([3c8556d](3c8556d)) * update button block ([#91](#91)) ([b66f75a](b66f75a)) * update button style ([#103](#103)) ([4b686f9](4b686f9)) * update desktop header template part ([#106](#106)) ([b5d45ba](b5d45ba)) * update footer part and lock blocks ([#105](#105)) ([0490354](0490354)) * update grid and typography ([64c70d7](64c70d7)) * update grid and typography ([f5073ef](f5073ef)) * update svg icons and search overlay ([#111](#111)) ([9ee5b6a](9ee5b6a)) * update the query pagination block ([#93](#93)) ([03e7fb6](03e7fb6))
🎉 This PR is included in version 1.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
This PR adjusts the padding of the buttons so it's updated with the new typography scale. It also changes the font-size of the button if it's set to XS : It should use S but with slightly reduced paddings. The Desktop/Mobile Header templates have been updated accordingly.
Note: There's also a small update to the columns's margin-bottom.
How to test the changes in this Pull Request:
Other information: