Skip to content
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

Remove components-icon-button classname #19241

Merged
merged 2 commits into from Dec 23, 2019

Conversation

@youknowriad
Copy link
Contributor

youknowriad commented Dec 19, 2019

Follow-up to #19193

This PR removes the components-icon-button and uses a has-icon modifier instead per our guidelines.

Testing instructions

  • Make sure the components modified by this PR are still showing up properly with no styling regressions.
@gziolo

This comment has been minimized.

Copy link
Member

gziolo commented Dec 19, 2019

The only issue I see with this proposal is that we might want to support Button component which is text-based but has an additional icon on the left or right side. However, in that case we can always add another class name to make it more explicit 🤷‍♂

@aduth

This comment has been minimized.

Copy link
Member

aduth commented Dec 20, 2019

I've restarted the failing build a few times by now. I'm not sure if the current failures are legitimate or not. It's making it difficult to have confidence in approving this.

.components-icon-button.block-editor-block-switcher__toggle,
.components-icon-button.block-editor-block-switcher__no-switcher-icon {
.components-button.block-editor-block-switcher__toggle,
.components-button.block-editor-block-switcher__no-switcher-icon {
Comment on lines -6 to +7

This comment has been minimized.

Copy link
@aduth

aduth Dec 20, 2019

Member

Should I expect to see the .has-icon modifier class here?

I see there's lots of examples where we're not including the modifier class when removing the icon- portion. Is that intentional?

This comment has been minimized.

Copy link
@youknowriad

youknowriad Dec 23, 2019

Author Contributor

I wanted to avoid the extra specificity when not needed. In most of these examples the extra has-icon has no impact we just want more specificity over the button styles;

@youknowriad youknowriad force-pushed the remove/components-icon-button-classname branch from 7a828e6 to 888b20c Dec 23, 2019
@youknowriad

This comment has been minimized.

Copy link
Contributor Author

youknowriad commented Dec 23, 2019

The test failures were due to a misplaced publish button. It should be all good now.

@youknowriad youknowriad merged commit 3ca05a7 into master Dec 23, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@youknowriad youknowriad deleted the remove/components-icon-button-classname branch Dec 23, 2019
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
ockham added a commit to Automattic/jetpack that referenced this pull request Jan 13, 2020
WordPress/gutenberg#19241 broke the styling of our Jetpack sidebar button  (again 😅) This is currently a problem on WP.com, where we just updated Gutenberg to 7.2.0.

This commit updates the class selectors accordingly.
jeherve added a commit to Automattic/jetpack that referenced this pull request Jan 16, 2020
WordPress/gutenberg#19241 broke the styling of our Jetpack sidebar button  (again 😅) This is currently a problem on WP.com, where we just updated Gutenberg to 7.2.0.

This commit updates the class selectors accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.