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

SmartNodeSelector: Use ellipsis to shorten (too) long node paths (tags) #132

Open
rubenthoms opened this issue May 20, 2021 · 1 comment

Comments

@rubenthoms
Copy link
Collaborator

rubenthoms commented May 20, 2021

In case of a deep tree structure or nodes with long names, tags showing the whole node path might get wider than the SmartNodeSelector container. In this case, the node path should be shortened by using ellipsis in front and/or after the currently selected node.

Example:

I am a very long node name:I am an even longer child node name:I am the grandchild node
| = text cursor

Tag is not selected

...longer child node name:I am the grandchild node

First node is selected

I am a very |long node name:I am an even longer ...

Second node selected

...name:I am an even| longer child node name:I am ...

Last node selected

...longer child node name:I am the| grandchild node

In addition, the max width of input fields should be limited as well. This is a trade off but it guarantees that tags are not getting larger than the SmartNodeSelector container for very long node names.

Also setting a min width for the SmartNodeSelector could be useful.

In general, a good advice would be to limit the length of node names. If this should be up to the user or should be enforced is up to discussion.

@asnyv
Copy link
Collaborator

asnyv commented Oct 15, 2021

I think it is a good idea with some dynamics like this :)

I don't think we should limit the length of node names (at least not force). End users might then run into issues when they try to use data that they cannot control the length of (or have to do a lot of reformatting of input data). Especially because the limit might have to be quite low if we are not to hit these issues at all.

If it is a problem that they often get too long, I think the SNS user (read: the webviz plugin maker, not end user) should rather extend the allocated width for the SNS, a min_width could maybe be a good tool to have in that situation. Not sure how well it will fit with the flex boxes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog 📝
Development

No branches or pull requests

2 participants