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

better support for long resource names #4614

Closed
nicks opened this issue Jun 7, 2021 · 6 comments · Fixed by #4774
Closed

better support for long resource names #4614

nicks opened this issue Jun 7, 2021 · 6 comments · Fixed by #4774
Labels
enhancement New feature or request ui

Comments

@nicks
Copy link
Member

nicks commented Jun 7, 2021

Describe the Feature You Want

Better support for long resource names in the UI

Current Behavior

The names get cut off, with no way to expand them

Why Do You Want This?

Kubernetes resources tend to use prefixes heavily. For example, many Helm charts prefix every resource in the chart with the same name.

This makes the sidebar display kind of useless, because all sidebar items have the same name.

Additional context
Related issue (choosing custom icons):
#3530

Note that you can also use k8s_resource(new_name=) to rename a resource manually

@nicks nicks added enhancement New feature or request ui labels Jun 7, 2021
@hyu
Copy link
Member

hyu commented Jun 7, 2021

A user also brought this up during a user interview on 3/8/21:

"...the little pane of where the logs generated from? I need that to be resizeable. It's too small. So it cuts off everything, and where the log source from I don't really know."... "The names of my services come from Helm charts. So they're all like, 'prefix-something-something-something-chart.' Super hard to read these."

Interviewer: "What if you could see the full name of a resource, and the trade-off is that it basically makes them taller and pushes stuff down?"

"
Yeah, or just shrink the font size. I mean, I had a custom style sheet for a while that just shrank the font size. The resource names don't change often enough for me to need them to be very readable."

@nicks
Copy link
Member Author

nicks commented Jun 9, 2021

i played around with some ideas around displaying common prefixes, it looks like this:

Screenshot from 2021-06-09 19-41-08
Screenshot from 2021-06-09 19-38-01

@hyu
Copy link
Member

hyu commented Jun 14, 2021

I think we should allow users to resize the sidebar. Kind of like in VS Code, how you can make the sidebar as wide as you want. Even absurdly wide, like so:

Screen Shot 2021-06-14 at 12 58 46 PM

@nicks, thanks for posting the idea of adding the prefix. My main concern with this design is that the text will be very small and possibly not legible because of the low contrast, and may contribute to a cluttered appearance for this card (which Surbhi and I have been trying to simplify)

@SurbhiSGupta
Copy link

I agree with @hyu that the best option would be to make the sidebar stretchable - either with or without prefix - because:

  • Long names can get even longer and splitting the name with a prefix alone, may not be sufficient
  • How is the prefix decided? How long can it be?
  • The card size looks very busy with an added field, especially in the sidebar

Here is a quick view of all the various options..

2021-06-10 Truncated name options for sidebar

@nicks
Copy link
Member Author

nicks commented Jun 14, 2021

Ya, we will probably end up having to do both.

The VSCode example is an illustrative one - note that VSCode only shows the base filename, not the absolute file path. It's the same problem here - if you show the full name, you will end up having to repeat redundant information a lot.

@nicks
Copy link
Member Author

nicks commented Jun 14, 2021

@SurbhiSGupta - re: "how is the prefix decided" - the experiment i was playing around with tried to infer them using "-" as a separator. Resource grouping might help solve this problem - I would expect all resources in a group to have a common prefix.

nicks added a commit that referenced this issue Jul 19, 2021
nicks added a commit that referenced this issue Jul 19, 2021
nicks added a commit that referenced this issue Jul 21, 2021
* web: Add a resize drag component to the sidebar

Fixes #4614

* web: factor out a width constant

* web: add split pane to OverviewResourceSidebar storybook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants