Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Make Resource Viewer layout repeatable #2343

Merged
merged 1 commit into from
Apr 25, 2021

Conversation

mklanjsek
Copy link
Contributor

This change divides the Resource Viewer node discovery in two parts: first during the tree traversal nodes are added to a cache, and at the end of traversal cached nodes are sorted and applied to the Resource Viewer layout. That ensures repeatable node order and consequently graph layout, while keeping the performance similar as before. This approach turned out to be more reliable than my first attempt of synchronizing the node creation by using go channels.

Nodes are sorted first by tree depth level and then by node kind/name. This not only improves the visual layout, but it also groups nodes of same kind closer together, opening a door for node grouping and collapsing/expanding.

Signed-off-by: Milan Klanjsek [email protected]

@lenriquez
Copy link
Contributor

It looks great to me!!

@GuessWhoSamFoo GuessWhoSamFoo self-requested a review April 21, 2021 18:00
@xtreme-vikram-yadav
Copy link
Contributor

👍

@GuessWhoSamFoo GuessWhoSamFoo merged commit d0d2595 into vmware-archive:master Apr 25, 2021
@GuessWhoSamFoo GuessWhoSamFoo mentioned this pull request Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add root node to resource viewer schema
4 participants