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

Text length can extend beyond the boundary of its container panel on a model's detail page #10596

Closed
atownson opened this issue Oct 6, 2022 · 8 comments · Fixed by #10621
Closed
Labels
topic: UI/UX User interface or user experience related work type: bug A confirmed report of unexpected behavior in the application

Comments

@atownson
Copy link
Contributor

atownson commented Oct 6, 2022

NetBox version

v3.3.5

Python version

3.8

Steps to Reproduce

  1. Create a custom field name "json_example" with a Type of JSON for any given model.
  2. Add a value to any given instantiated model for the "json_example" field that is rather long, say 100 characters.
  3. View the model's detail page and observe the value extends beyond the panel boundary, given the width of the webpage.

Expected Behavior

The horizontally-long text should either wrap or a scrollbar should be shown.

Observed Behavior

The text extends beyond the panel boundaries.

demo.netbox.dev:
image

The Config Context works well with a scrollbar:
image

The JSON field is the most obvious offender as it's quite common for the text to be long, but other, more exaggerated, examples are given in the illustration.

My suggestion would be to implement an automatic scrollbar if the content overflows for just the single field value, so that users don't have to scroll the entire panel and they don't have to scroll to access buttons that are justified to the right.

@atownson atownson added the type: bug A confirmed report of unexpected behavior in the application label Oct 6, 2022
@jeremystretch
Copy link
Member

Bootstrap provides utility classes to control how overflow is handled, however using them would require application to all potentially relevant areas. It might be prudent to just set overflow: scroll on all card bodies application-wide.

@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Oct 7, 2022
@arthanson arthanson self-assigned this Oct 11, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 12, 2022
jeremystretch added a commit that referenced this issue Oct 12, 2022
@jeremystretch
Copy link
Member

Unfortunately the solution under PR #10621 (applying overflow-auto to all card bodies) interferes with dropdown menus within a card. Not sure what the optimal fix is here.

@arthanson
Copy link
Collaborator

@jeremystretch can you provide a page where this shows the issue (where there is a dropdown menu within a card) and I will take a look.

@jeremystretch
Copy link
Member

I've been recreating it by setting the description for a site to its max length using a string of As. The unbroken string pushes past the right hand boundary of the card (assuming a narrow enough browser window).

@kkthxbye-code
Copy link
Contributor

@jeremystretch - I think he was asking for an example of the broken dropdown because of the initial fix.

@jeremystretch
Copy link
Member

Sorry, no coffee yet. IIRC I noticed it on the "connect" dropdown when viewing an unconnected interface.

@arthanson arthanson self-assigned this Nov 4, 2022
@arthanson
Copy link
Collaborator

This (https://css-tricks.com/popping-hidden-overflow/) looks like it explains the issue, uses some javascript. Tried overflow-wrap: break-word; and overflow-x: auto to no avail... Not sure of a good solution for this yet.

@arthanson arthanson removed their assignment Dec 2, 2022
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: accepted This issue has been accepted for implementation labels Apr 3, 2023
@arthanson arthanson added the topic: UI/UX User interface or user experience related work label Apr 24, 2023
@jeremystretch
Copy link
Member

Closing this for inactivity. It's something we're sure to revisit under #12128.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
@jeremystretch jeremystretch removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label May 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: UI/UX User interface or user experience related work type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants