Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree widget: Hierarchical categories tree #1126

Open
grigasp opened this issue Dec 18, 2024 · 6 comments
Open

Tree widget: Hierarchical categories tree #1126

grigasp opened this issue Dec 18, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request tree widget Tree widget or its components related issues

Comments

@grigasp
Copy link
Member

grigasp commented Dec 18, 2024

At the moment the Categories tree component renders the categories as a flat list, and each category may have its SubCategories as children.

Some iTwin.js applications are starting to group Categories under bis.DefinitionContainer elements and would like to see that represented in the Categories tree. The exact structure is TBD.

Things to take into account:

  • Categories not under a definition container should be displayed as root nodes as they are today.
  • Definition containers contain definition elements, and a bis.Category is only one of the subclasses. A container may contain other types as well, but we only want to show container that have categories. - needs to be confirmed - is this also the case for editing cases?
@grigasp grigasp added enhancement New feature or request tree widget Tree widget or its components related issues labels Dec 18, 2024
@grigasp
Copy link
Member Author

grigasp commented Dec 18, 2024

@laurynas111, could you please describe the hierarchy structure you'd like to see? Specifically, I'm interested in:

  • what do we show as root nodes,
  • how do we get from root nodes to definition containers.

@laurynas111
Copy link

Adding cmap jpeg with an example use case:
Image
Also sharing similar component used in a dgn product:
Image

@grigasp
Copy link
Member Author

grigasp commented Jan 24, 2025

@laurynas111, as part of this change, we'll want to add icons to nodes, to make sure users can tell the difference between containers, categories and subcategories. Generally, we use icons from here: https://itwin.github.io/iTwinUI-icons/, and for bis.Category we use https://itwin.github.io/iTwinUI-icons/#icons-layers. Any ideas what we could use for DefinitionContainer and SubCategory?

@laurynas111
Copy link

I think we should be consistent with the Design Review.
If Design Review does not use icons for these Elements, perhaps UX should be involved to suggest some? Maby iTwin UX team could help? e.g. Veronique

@grigasp
Copy link
Member Author

grigasp commented Jan 24, 2025

I think we should be consistent with the Design Review. If Design Review does not use icons for these Elements, perhaps UX should be involved to suggest some? Maby iTwin UX team could help? e.g. Veronique

Design Review doesn't have icons in Categories tree, but that's not that big of a problem there, because it always shows Categories as root nodes and SubCategories as children.

Now, we'll start seeing Categories mixed with DefinitionContainers at the same hierarchy level, at which point being able to distinguish them visually becomes much more important.

@VeroniqueVezina, thoughts?

@grigasp
Copy link
Member Author

grigasp commented Jan 24, 2025

Adding existing Categories tree screenshots for reference.

v2, currently used in Design Review PROD:
Image

v3:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tree widget Tree widget or its components related issues
Projects
None yet
Development

No branches or pull requests

3 participants