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

Components: Cleanup Dashicons component #17741

Merged
merged 1 commit into from
Oct 3, 2019
Merged

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Oct 3, 2019

Description

This is a follow-up for #17356 where we refactored IconButton component to no longer pass down ariaPressed prop. This means that it's no longer used in the code and it should be removed from the child components which were reading its value.

I checked the history and it looks like ariaPressed was introduced in #11827. It was never really used in the web code. Should it be also removed in other places?

In particular, I think about Dashicon implementation which used to pass this prop down but it seems to longer be necessary. See:

const iconClass = getIconClassName( icon, className, ariaPressed );

I updated Dashicon to look closer to:
https://github.com/WordPress/dashicons/blob/master/react/index.jsx

Testing

Steps from #17356 are the best way to validate it:

  • Run the example app with Xcode 11 beta
  • Check that the toolbar colors are correct on the toolbar (following the screenshots)
  • Check that the rest of the icons in the app shows properly
  • In particular the BottomSheet icons (Add link / Image settings)
  • Check that the icon Subscript is colored properly (Numbers on H1, H2, etc...)

@gziolo gziolo requested a review from etoledom October 3, 2019 09:42
@gziolo gziolo self-assigned this Oct 3, 2019
@gziolo gziolo requested a review from mchowning October 3, 2019 09:45
@gziolo gziolo added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Oct 3, 2019
Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested: Icons on blocks, toolbars, block appender and bottom sheets.
On iOS Dark and Light mode, and Android.

Everything seems to work perfectly 🎉

Thank you @gziolo !

@gziolo gziolo merged commit 0bef434 into master Oct 3, 2019
@gziolo gziolo deleted the update/cleanup-dashicons branch October 3, 2019 11:31
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants