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

Add sorts #165

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add sorts #165

wants to merge 7 commits into from

Conversation

johnbister
Copy link
Contributor

this closes #132

@netlify
Copy link

netlify bot commented Dec 1, 2022

Deploy Preview for carbon-icons-motion ready!

Name Link
🔨 Latest commit f9ebd7b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-icons-motion/deploys/63a214d72a33b40008046892
😎 Deploy Preview https://deploy-preview-165--carbon-icons-motion.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@johnbister johnbister marked this pull request as ready for review December 1, 2022 16:18
Comment on lines +624 to +629
<li
className='icon-tile'
onMouseEnter={() => setSortAscendingAnimating(true)}
onMouseLeave={() => setSortAscendingAnimating(false)}
>
<h3>Sort ascending</h3>
Copy link
Contributor

Choose a reason for hiding this comment

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

Feel like you should consider creating an IconTile component so if you ever need to change the structure, you won’t need to replace all these <h3>s. Probably feels pretty minor for now, but could come in handy down the road if you only need to make the changes in one place instead of for each instance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree 110%! It's something I've planned on fixing but haven't gotten to yet. I thought I had an issue open for it but I didn't, so I'll make one now!

Copy link
Contributor

@elycheea elycheea left a comment

Choose a reason for hiding this comment

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

Noticing a quirk with the sort remove animation in Chrome — see attached GIF. Only noticed it at 100% zoom. As is though, the animation could be confusing to understand.

Comment on lines +49 to +77
@keyframes sort-remove-vertical {
0% {
transform: scaleY(1);
}
10% {
transform: scaleY(.7);
}
20% {
transform: scaleY(1);
}
100% {
transform: scaleY(1);
}
}

@keyframes sort-remove-horizontal {
0% {
transform: scaleX(1);
}
10% {
transform: scaleX(.7);
}
20% {
transform: scaleX(1);
}
100% {
transform: scaleX(1);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you’ve run into this before with other icons, but noticed that at 100% (default zoom) this appears rotated (like a + sign) in Chrome. This was not an issue in Safari though so it’s possible that it’s specific to Chrome? As is though, this could be a confusing animation.

2022-12-12 at 16 45 09 - sort remove

(Zoomed in at the end where it does not appear to be an issue anymore.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elycheea Thanks for catching this and for all the help! I can't seem to recreate the glitch in Chrome at 100 zoom or zoomed out/in. Hmm. Weird! I'll keep trying.

@kristastarr Do this glitch happen for you too in chrome?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fwiw, I’m in Chrome 108. Probably won’t get a chance to look into it more today, but I definitely did not see this in any of the other close/X icons when I did a quick check.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Very weird. I don't see the problem zoomed in, out, or at default zoom in Chrome 108, Firefox, or Safari 🤔 I've been doing some reading on transform: rotate() vs rotate. I'm going to try changing to transform: rotate to see if we get a different result - @elycheea after I push the change, would you mind checking Chrome again and see if you are still seeing the issue?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well I'm super confused now bc when I make the change from rotate: 45deg to transform: rotate(45deg), I am seeing the issue. I went ahead and pushed the change. @johnbister @elycheea do you both want to check and see how it looks for you now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kristastarr @elycheea I also see the issue now that it has been changed to transform: rotate(45deg)

I still don't can't recreate the issue at any zoom or default in Chrome when it is rotate: 45deg. So weird. Should we change it back?

.SortRemoveVertical,
.SortRemoveHorizontal {
will-change: transform;
rotate: 45deg;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think usually we use transform: rotate(), but looks like rotate has decent although fairly recent support.
https://developer.mozilla.org/en-US/docs/Web/CSS/rotate#browser_compatibility

Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

New icon animation: sort ascending, sort descending, sort remove
3 participants