fix(launchplan): render the full launch plan list instead of clipping it#923
Open
1fanwang wants to merge 1 commit into
Open
fix(launchplan): render the full launch plan list instead of clipping it#9231fanwang wants to merge 1 commit into
1fanwang wants to merge 1 commit into
Conversation
The launch plan table and card views virtualized against
document.getElementById('scroll-element'), which is null in this layout, so the
virtualizer had no scroll container and rendered the wrong number of rows. The
table view also read result?.length (the lodash `result` function, always
truthy) instead of results?.length. Render the results directly with stable keys.
Signed-off-by: 1fanwang <1fannnw@gmail.com>
3c7258b to
9bbe292
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TL;DR
If a project has more than ~30 launch plans, the list quietly cuts off — you can scroll to about the 30th row and the rest are unreachable. So on anything with a real number of launch plans, most of them are effectively invisible.
Type
Are all requirements met?
Complete description
Both list views virtualize against a scroll container they look up once with
document.getElementById('scroll-element'), and the virtualizer never ends up with a working container — it renders the first windowful of rows and there's nothing to scroll to. The table view also takes its count fromresult?.length, the always-truthylodash/resultfunction, where it meantresults. These lists are short enough that virtualization wasn't earning its place, so I dropped it from both views and renderresultsdirectly.Smoke-tested on a live console with 64 launch plans: before, scrolling bottoms out around the 30th row; after, it reaches the last.
LaunchPlanTableView.test.tsxguards the regression — three results in, three rows out.Tracking Issue
NA
Follow-up issue
NA