-
Notifications
You must be signed in to change notification settings - Fork 87
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
Category indicator not displaying correctly when horizontally scrollable #206
Comments
From what I checked quickly, maybe we should do CSS border bottom for the category button instead of manual calculation? |
Thanks for reporting. For the RTL issue, I think it might be a separate issue, but for the "too small" issue, I had kind of assumed that the picker would never need to be scrolled horizontally like that. Although I suppose there are some valid use cases for that (small feature phones?). The manual calculation is done for performance reasons, but maybe Chrome no longer has the perf issue described here so we can roll it back. I'll look into it. emoji-picker-element/src/picker/components/Picker/Picker.js Lines 261 to 272 in 13e6bcb
|
Yep, I was testing with an iphone 6s, which has the width of only 375px including some padding/margin (I'm making a widget that can be used in different places). Thanks for looking into it! |
The solution I intended for small screens was to change @media screen and (max-width: 375px) {
emoji-picker {
--num-columns: 6;
--category-emoji-size: 1.125rem;
}
} I didn't really intend for it to ever be horizontally scrollable, but I guess I didn't do a good job explaining that in the docs. 😅 Or maybe I should just include some built-in CSS for small screens. |
OK, looks like the manual calculation (exact pixels vs percent-based) has nothing to do with this. There are two separate bugs:
BTW the reason I don't use a border-bottom is because there's no way to animate it performantly (GPU-accelerated). |
Opened a new issue for RTL: #212 |
Thanks, just my thought, we don't really need the "slide" animation, a simple border bottom works well IMO (it clearly indicates that we're in that category, and doesn't look too bad) |
I added some docs around this: #215 I don't plan to switch to I would prefer for people to add their own CSS so that the categories are not horizontally scrollable, but in theory it should be possible to make the indicator adapt to the width of the categories, so I'll leave this bug open. |
Hello,
First of all, thanks for your work with this project, it's great!
I just found a problem with the category indicator, it doesn't display well in 2 cases:
I attach 2 short videos so it's easier to see
Screencast.2021-08-09.16.31.43.mp4
Screencast.2021-08-09.16.33.20.mp4
I'm sorry, I don't have enough time to look into the code to suggest a fix...
The text was updated successfully, but these errors were encountered: