iTwin / viewer-components-react

Components built on iTwin.js for usability in an iTwin.js based Viewer.
MIT License
24 stars 33 forks source link

Tree Widget: Selection tree component #362

Closed grigasp closed 3 months ago

grigasp commented 2 years ago

Proposal for a Selection Tree component

Problems

When an element is selected, it's impossible see its context in one place - model, category, parent elements, child elements. Model, category and the immediate parent can be checked in the Property Grid component, but they're not interactive (you can't do anything with them except view their labels) and you can only see child elements in the Models Tree component, but that requires finding the selected element in the hierarchy, which could be an impossible task in large iModels.

In addition, not being able to see and/or interact with selected element's ancestor and child elements takes away a convenient way to adjust selection, which is especially important when there are non-graphical ancestors with properties that users want to see.

Suggestion

The suggestion is to introduce a new Selection Tree component that could become part of the Visibility Widget.

Hierarchy

The important part is to show selected element's Model, Category, ancestors and possibly child elements. How it's going to be set up is TBD. A couple of ideas:

We may want to consider showing Subject hierarchy from Model through InformationPartitionElement, parent Subject up to the root Subject. If we do, need to consider the case when Model models a non-InformationPartitionElement.

Interactions

grigasp commented 3 months ago

Closing in favor of https://github.com/iTwin/viewer-components-react/issues/788