-
Notifications
You must be signed in to change notification settings - Fork 82
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
Klistwithoverflow component #552
Klistwithoverflow component #552
Conversation
a749d2b
to
086b5c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only done an initial read through of this, @AlexVelezLl, and will do a more thorough review tomorrow with more comments and notes, but this looks like really great work! 🎉 I'm excited :)
Hi @AlexVelezLl, overall the interface is looking great and flexible, wonderful work on research and implementation. This will be very helpful for many components across all products. I will submit a full review later on. One thing I'd like to suggest at the outset is that we don't use Since we won't need to support IE anymore, I think we could try to use ResizeObserver? Or you're welcome to research other alternatives. If you were going to use the |
Thank you @MisRob! Yes, I've worked before with So, I'll use the A solution if issues arise due to this behavior (not recalculating the overflowItems when item resizing in older browser) could be to hide the entire list and only render the "more button", which would allow it to remain functional. |
@AlexVelezLl We don't need to support all browsers. There are actually plans to remove IE11 specific logic from KDS, so it'd be best not to be adding support for it or other browsers that are not needed. Please see the Kolibri browserlist and if all these browsers support |
It used to be, yes. The removal of IE11 support is a pretty recent update that will take effect in Kolibri 0.17. Generally, Kolibri has the most strict requirements in our ecosystem so its browserlist is the thing to watch for. |
One thing to watch for in this period of transition is not to use this logic in Kolibri 0.16, for example not to refactor any components to use it. I don't think we will do that :) But will make sure to mention it in the release notes. |
Thanks @MisRob, I just updated the PR with the ResizeObserver.
Yes, it seems like not all Kolibri's supported browsers support |
I was planning to use it for the languageSwitcher in the Kolibri's setup wizard learningequality/kolibri#11923. Do you mean not including this in future 0.16 patches? |
I don't see a milestone yet for learningequality/kolibri#11923 yet. So to sum it up: (1) If the issue is planned for 0.16 => we need IE11 support in this component now and will remove it later (2) will is simpler, but if it's important to have it in 0.16, we can add IE fallback now as you suggested and remove it later. I'd leave you decide together with @marcellamaki about the milestone for the issue. |
Got it! I dont think its super urgent tho |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexVelezLl Overall, this is great work, very clear and flexible component design and I appreciate your comments. I am not going to pretend I fathomed all the calculations in detail but as a whole it makes sense to me and I didn't notice anything suspicious. Posting a few comments and a question or two.
I think that's all from my first review round |
Thank you @MisRob! Comments addressed :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AlexVelezLl, good work here.
Description
Introduces a new component
Klistwithoverflow
that renders an horizontal list that automatically renders a "show more" component if any items overflow the container.Issue addressed
Addresses #556
Before/after screenshots
Compartir.pantalla.-.2024-02-27.09_35_51.mp4
Changelog
KListWithOverflow
component.useKResponsiveElement
private composable,KResponsiveElementMixin
translated to this composable.Steps to test
Implementation notes
At a high level, how did you implement this?
flex-wrap: nowrap
andoverflow: visible
so that all the items are on a single line without taking more height and without showing the overflow bar.hidden
orvisible
, this allows us to know the width of all the items without the user seeing them.Testing checklist
Reviewer guidance
After review
CHANGELOG.md