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

Fix: Add props passing into icons #144

Merged
merged 2 commits into from
Sep 10, 2020
Merged

Fix: Add props passing into icons #144

merged 2 commits into from
Sep 10, 2020

Conversation

enejb
Copy link
Member

@enejb enejb commented Sep 9, 2020

Currently the icons don't allow for props to be passed to the main SVG component.

The problem is that this prevents the mobile Gutenberg editor from passing in the correct fill prop for the icon.

On the mobile inserted.
Before:
Screen Shot 2020-09-08 at 12 34 53 PM

After:
Screen Shot 2020-09-09 at 12 50 15 PM

To tests

I build a new version of the layout-grid plugin.
using yarn plugin layout-grid
and then yarn bundle

And then I installed the plugin on my site.
And tried to find if the icons have changed anywhere with undesirable outcomes.

See:
Screen Shot 2020-09-09 at 1 44 38 PM

Screen Shot 2020-09-09 at 1 44 11 PM

Screen Shot 2020-09-09 at 1 44 17 PM

Screen Shot 2020-09-09 at 1 44 30 PM

To test it on mobile I followed the instructions in wordpress-mobile/gutenberg-mobile#2582
and then patched the icon file. Which fixed how the icons appeared.

@enejb enejb requested review from mkaz and jasmussen and removed request for mkaz September 9, 2020 21:15
@enejb enejb self-assigned this Sep 9, 2020
@enejb enejb added the Enhancement New feature or request label Sep 9, 2020
@enejb enejb requested review from mkaz and Tug September 9, 2020 21:23
Copy link
Contributor

@mkaz mkaz left a comment

Choose a reason for hiding this comment

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

This looks fine, one question on the two GridIcon components you include a props = null but on the rest you just add a props parameter without the default null.

In my initial testing it looks like it doesn't make a difference, I would probably prefer without the default but either way should be consistent across all.

Copy link
Contributor

@mkaz mkaz left a comment

Choose a reason for hiding this comment

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

Thanks for updating, looks good 👍

@enejb
Copy link
Member Author

enejb commented Sep 10, 2020

Thanks for the review and testing @mkaz !

@enejb enejb merged commit d9c3f03 into master Sep 10, 2020
@enejb enejb deleted the fix/layout-grid-icon branch September 10, 2020 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants