fix: make virtual-list loading more efficient #22384
Merged
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.
User facing changelog
Increase rendering speed of items in spec-list
Additional details
When quickly scrolling the spec list, there is a flash of un-rendered content due to the the virtual list having to re-render so many elements. This only became an issue with the recent ACI work that added more components to each row.
This fix defers the rendering of many of the columns such that the row + filename is given priority, leading to a more responsive feel to the table. It doesn't fix the issue entirely as fast scrolls can still cause a white flash, but it does improve the experience.
This PR DOES NOT fix the scroll jank on Chrome. That is an issue in Chrome v102 that has been fixed in v103. The scroll behavior works find in Firefox + Electron
Steps to test
Check out muaz/CLOUD-577-spec-list-display-latest-runs and choose a project with a decent amount of tests. Scroll through the list quickly (or use the scrollbar) to see flashes on run-rendered content
How has the user experience changed?
Before:
Screen.Recording.2022-06-17.at.11.31.30.AM.mov
After:
Screen.Recording.2022-06-17.at.11.32.00.AM.mov
PR Tasks
cypress-documentation
?type definitions
?