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

Update polaris-icon to v2.0.0 #123

Merged
merged 4 commits into from
May 14, 2018

Conversation

andrewpye
Copy link
Member

Updates polaris-icon to match the v2.0.0 React component by adding the internal isColored class (required for proper icon rendering now), and setting the new focusable and aria-hidden attributes on the icon's SVG element.

@andrewpye andrewpye self-assigned this May 11, 2018
@andrewpye andrewpye requested review from vladucu and tomnez May 11, 2018 09:55
@andrewpye andrewpye mentioned this pull request May 11, 2018
5 tasks
Copy link
Contributor

@tomnez tomnez left a comment

Choose a reason for hiding this comment

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

2.0 hotness! 🔥

for (const color of colors) {
this.set('color', color);

const colorClass = `Polaris-Icon--color${classify(color)}`;
assert.ok(icon.classList.contains(colorClass), `icon with ${color} color applies ${colorClass} class`);
assert.equal(icon.classList.length, 3, `icon with ${color} color does not add other color classes`);

const colorClassNames = [...icon.classList].filter((className) => className.indexOf('Polaris-Icon--color') === 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't bug me being all on one line, but for the record if I did this, you'd have me split it up 😛

Copy link
Member Author

Choose a reason for hiding this comment

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

:trollface:

Guess I thought that the intent of this line was more important than showing the details explicitly, but you're right, I should play by my own rules 😛

@@ -44,19 +48,30 @@ test('it applies colors correctly', function(assert) {
'purple'
];

assert.expect(2 + colors.length * 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Copy link
Member

@vladucu vladucu left a comment

Choose a reason for hiding this comment

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

🚀

@@ -19,15 +20,13 @@ export default Component.extend({

layout,

/*
* Public attributes.
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@andrewpye andrewpye merged commit f167e57 into update/polaris-v2.0.0 May 14, 2018
@andrewpye andrewpye deleted the update/polaris-icon-to-v2.0.0 branch May 14, 2018 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants