-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(breadcrumbs): Fix flicking on scroll from bottom to top - [TET-429] #41055
Merged
Conversation
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
github-actions
bot
added
the
Scope: Frontend
Automatically applied to PRs that change frontend components
label
Nov 7, 2022
priscilawebdev
changed the title
fix(breadcrumbs): Fix flicking on scroll from bottom to top
fix(breadcrumbs): Fix flicking on scroll from bottom to top - [TET-429]
Nov 7, 2022
priscilawebdev
commented
Nov 7, 2022
|
||
const Wrapper = styled('div')<{error: boolean; scrollbarSize: number}>` | ||
display: grid; | ||
transform: scaleY(-1); |
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.
flips here
@@ -200,10 +175,11 @@ const StyledPanelTable = styled(PanelTable)<{scrollbarSize: number}>` | |||
|
|||
/* Content */ | |||
:nth-child(n + 7) { | |||
${p => !p.isEmpty && 'transform: scaleY(-1)'}; /* Flip the list */ |
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.
flips here
matejminar
approved these changes
Nov 9, 2022
andriisoldatenko
approved these changes
Nov 9, 2022
priscilawebdev
added
the
Trigger: Revert
Add to a merged PR to revert it (skips CI)
label
Nov 11, 2022
PR reverted: 5c05c22 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Scope: Frontend
Automatically applied to PRs that change frontend components
Trigger: Revert
Add to a merged PR to revert it (skips CI)
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.
Issue:
In the breadcrumbs of an issue, we currently use components from the react-virtualized library to render a virtual list.
The current logic makes the UI automatically scroll to the last item in the list when the component is rendered and if users want to see more items from the list they have to scroll from the bottom to the top.
The problem is that since the items have a dynamic height and they haven't been rendered yet, it causes the list to have a flickering effect which is very annoying.
This issue seems to be well-known by the library's maintainers and according to some discussions, it is yet not fixed. See:
bvaughn/react-virtualized#610
The same issue seems to be happening in the new version of the library too:
bvaughn/react-window#6
Solution (workaround):
As the virtual list seems to work fine when scrolling from top to bottom, the workaround was to invert the list items and also the CSS and this seems to present a better user experience.
Before:
Screen.Recording.2022-11-07.at.12.30.52.mov
After:
Screen.Recording.2022-11-07.at.12.29.28.mov
ps: took the opportunity to do some code cleanup