viewer-components-react icon indicating copy to clipboard operation
viewer-components-react copied to clipboard

Models tree: Allow ruleset customization

Open grigasp opened this issue 2 years ago • 2 comments

At the moment there's no way to customize the Models Tree hierarchy. The specific requirement is to add additional rules to load additional child nodes for specific types of geometric elements.

The custom ruleset may create nodes that we don't know how to handle. Need to ensure:

  • It's possible to provide such a visibility handler that can handle those custom nodes.
  • The component behaves expectedly when visibility handler does not handle such nodes - the created node should simply not provide any visibility cues or controls.
  • Documentation is clear on:
    • The kind of nodes ModelsTreeVisibilityHandler expects and how to create similar ones through custom rules.
    • What happens if a custom node that's not handled by default visibility handler is returned.
    • What needs to be done to implement visibility handling for custom nodes.

grigasp avatar Dec 13 '23 08:12 grigasp

@1abjora @grigasp Any news on this one? Maybe this could be scheduled for upcoming future? Or we could make a contribution that enables custom processing of current rules (minimal changes required). We could mark it as experimental/internal so that anyone that uses additional props on ModelsTree know that this might break at any point?

GintV avatar May 28 '24 09:05 GintV

@1abjora @grigasp Any news on this one? Maybe this could be scheduled for upcoming future? Or we could make a contribution that enables custom processing of current rules (minimal changes required). We could mark it as experimental/internal so that anyone that uses additional props on ModelsTree know that this might break at any point?

We're in the process of rewriting the tree widget to not use presentation rules and I'd hate to spend time changing the components we're about to deprecate. If you have the necessary changes, please set up a PR.

grigasp avatar May 28 '24 12:05 grigasp

Tree widget version 3.x doesn't use rulesets any more, so requirements need to be revisited in the changed context. Closing this issue, please open a new one if any improvements are needed for 3.x widget.

grigasp avatar Dec 20 '24 06:12 grigasp