Repository navigation
fix(frontend, v1.3): list a version's files when the Versions & Files tab opens - #8884
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…pens (#8838) ### What changes were proposed in this PR? The version file tree uses virtual scroll, which measures its viewport once and then only on scroll. On the dataset and model detail pages the tree sits in the "Versions & Files" tab, which is hidden when the page loads. So the files arrived while the tree measured a 0px viewport, and it drew no rows until switching versions changed its height and forced a re-measure. The tree now re-measures itself whenever its container is shown or resized, using a `ResizeObserver`. The fix is inside the tree component, so the dataset page, the model page and the two version pickers that reuse it are all covered. No change to the host pages. - `user-dataset-version-filetree.component.ts`: observe the container and call `tree.sizeChanged()` (past the library's throttle) on resize; disconnect on destroy. The existing re-measure on a height change goes through the same helper. - `user-dataset-version-filetree.component.html`: `#container` ref on the tree's container. Before: dataset and model right after opening the tab: <img width="1440" height="900" alt="annotated-before-dataset" src="https://github.com/user-attachments/assets/01d99d8c-179b-455f-ab03-68357b3164f3" /> <img width="1440" height="900" alt="annotated-before-model" src="https://github.com/user-attachments/assets/01631a0b-0d66-428a-8161-17ba0568efe3" /> After: the same pages right after opening the tab: <img width="1440" height="900" alt="annotated-after-dataset" src="https://github.com/user-attachments/assets/7c754657-b172-4b9f-a6a4-5c7fa53e54f7" /> <img width="1440" height="900" alt="annotated-after-model" src="https://github.com/user-attachments/assets/747b0135-923d-4735-b0d8-62c2fed0b348" /> ### Any related issues, documentation, discussions? Closes #8833 ### How was this PR tested? One case added to `user-dataset-version-filetree.component.browser.spec.ts`: a tree filled while hidden renders its rows once shown. It fails without the fix (0 rows) and passes with it. ``` cd frontend yarn ng run gui:test-browser --include='**/user-dataset-version-filetree.component.browser.spec.ts' # Tests 6 passed (6) yarn ng test --watch=false --include='**/user-dataset-version-filetree.component.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' # Tests 249 passed (249) ``` Also checked against a local stack: on a dataset and a model with two versions, the latest version's files are listed as soon as the "Versions & Files" tab opens, and switching versions still updates the list. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) (backported from commit 9a427cc) Co-authored-by: Meng Wang <mengw15@uci.edu>
Contributor
Author
|
Clean cherry-pick — nothing here was edited by hand. It applied to Close this PR and reopen it to start its required checks. This pull request was opened by After that: approve, and enable auto-merge if you would rather not come back when the checks finish. |
This branch has not been deployed
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.
What changes were proposed in this PR?
Automated backport of #8838 to
release/v1.3.Source: 9a427cc · automation run
Any related issues, documentation, discussions?
Backport of #8838. Originally linked #8833.
How was this PR tested?
The backported tree built green before #8838 merged. Release-branch CI runs on this PR once it is reopened — see the comment below.
Was this PR authored or co-authored using generative AI tooling?
No.