Repository navigation
SOLR-17887: Add a reusable FileTree component to the new Admin UI - #5256
Draft
nick-boss-tech wants to merge 7 commits into
Draft
nick-boss-tech wants to merge 7 commits into
nick-boss-tech wants to merge 7 commits into
Conversation
malliaridis
self-requested a review
October 30, 2026 10:29
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.
🤖 AI text below 🤖 (reviewed by Nick Shanin)
Ready for review, but held as a draft due to the project's open-PR cap; I'll mark it open on request.
https://issues.apache.org/jira/browse/SOLR-17887
What happens today
ui/sharedhas no composable that shows a folder hierarchy. NoFileTreefile exists underui/at the merge-basec8ab71430f. A screen that needs nested, expandable folders has to build one from scratch.What this change does
A reusable
FileTreecomposable adds nested folders with expand, collapse, and selection. Folders open and close from the chevron or a double click on the folder name. A click or double click on any row selects that row, and the component keeps the selection. A single click callsonItemClick, and a double click callsonItemDoubleClick. TheselectedPathinput sets the starting selection, and a later change to it replaces the selection. The selected row and its file icon use the app's selected colors. The expanded state stays inside the component. The data model,FileTreeNodewithFileTreeFileandFileTreeFolder, has no API dependency.Behavior change, stated openly: a single click reports after the platform double-click window, because
combinedClickablemust wait to tell a single click from a double click. Selection andonItemClickboth wait for that window.Christos Malliaridis scoped this ticket and asked for the PR in his Jira comment. He said he will review it.
Proof
The new tests check selection, but the component is new, so they cannot fail on the base. The proof is inconclusive by construction. The click-selection test fails when the selection update is removed from the click handler.
FileTreeTestpasses 8 of 8 on the JVM and 8 of 8 in the browser wasm run, verified 2026-10-27 at head025164fb, with a fresh run and no build cache.The full
./gradlew -p ui checkpasses at the same head: JVM tests 55 run, 0 failures, 2 skipped; browser wasm tests 59 run, 0 failures, 3 skipped; spotless passes.A screen check renders the component inside the app theme and compares it with the design's file tree frames (Configsets Files and Cluster Zookeeper Files). The structure matches: chevron before the folder icon, indented children, and file rows. The selected row is close to the design's color but a little darker: sampled
#ED937Ein the render and#FE9E85in the design. The selected file icon is dark red in both:#511104in the render and#550000in the design. The unselected file icon is gray in the design, and the component uses the theme's text color. The thumbnails are too small to confirm that gray, so it is not claimed as matched.Screenshots
Headless Chromium 156, production
FileTreeinsideSolrTheme(light theme), 1024x768, fixture states. Icons load asynchronously on wasm, so the captures wait for them. Hosted in a secret gist.Limits
FileTreeyet. Christos asked that the components that use it come in later tickets. This PR adds no integration. A follow-up ticket for that is Christos's to create, and I can open a PR for it on request.Changelog: changelog/unreleased/SOLR-17887.yml
AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.