-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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: proper collapsing of long element #5694
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why ... instead of just adding the item at the beginning?
Also I'd suggest adding that example at the very beginning. Adding it at the end makes it not clear that it actually wraps, because we don't see it moving from 1 line to 2 lines (at least on my screen). I had to remove the scrollbar with devtools to be sure it does.
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.
Sorry, it didn't seem to matter to me, but I moved it to top of list.
Yes, but it still not as annoying as the current issue. I still can't find better solution.
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.
The wrapping affects only a few sites (it's worst but unless bad luck the last item remains clickable).
The collapsible problem is a smaller problem but it affects all sites in multiple places.
I'd rather wait and find a better solution.
IMHO the solution we want is to ensure the category label does not wrap anymore: #5254 It would solve 2 issues at once
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 disagree, the current issue affects to more sites (not just those two sites) and therefore more serious. The other issue with multiple clicks is a rare case, though. Well then let's initially calculate collapsible element height with possible scrollbar. Any objections?
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 think we won't agree on this, unfortunately, but I don't like the idea to fix an issue (that none or very few users reported as a major problem) by introducing a regression somewhere else: we must find a way to fix both issues at once.
This new solution is not ideal either.
A scrollbar can temporarily appear as you click:
And if you reduce the size of the category that has a wrapping element, you'll notice some extra height added at the end, and then "fixed" on animation end.
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 think you should consider realistic usage scenarios first. So the scrollbar will not be displayed if the user clicks once -- this is main realistic use case. Why would anyone want to click on a category many many times?
"no user reported" -- that's because users mostly don't care on it, they came to docs site for information, they are not testers. Better ask the owner of Redux site about this issue, he's hardly aware of it because he doesn't test the whole site by clicking on every category, I guess.