snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.88k stars 3.14k forks source link

Long text in Asset's "Note (Protected)" field breaks view asset page #15501

Open scorchmeister13 opened 1 week ago

scorchmeister13 commented 1 week ago

Debug mode

Describe the bug

If assets have long text inserted into the "Notes (Protected)" field, the minified text does not wrap properly and ends up hiding the Asset update buttons on the right side (Attached an image). In the cases where the text is even longer the buttons are hidden completely.

Screenshot from 2024-09-13 14-09-19

The issue looks to be similar to https://github.com/snipe/snipe-it/issues/13028 but for Protected fields.

Reproduction steps

  1. Edit asset

  2. Add the following text to "Notes (Protected)": ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ

  3. Check view asset page

  4. Make the window smaller hotizontally if the options on right side are not hidden automatically ...

Expected behavior

Line that doesnt fit to screen needs have individual horizontal scroll bar

Screenshots

No response

Snipe-IT Version

v7.0.11 and v7.0.12

Operating System

Debian

Web Server

Nginx

PHP Version

Latest

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 1 week ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

scorchmeister13 commented 5 days ago

I was able to resolve the issue by updating the attached file on path /var/www/html/resources/views/layouts/default.blade.php.

If possible can anyone guide me or help on the merge for it to be included in next release?

default.blade.php.zip

snipe commented 5 days ago

What's the use case for having such a long string with no line breaks?

scorchmeister13 commented 5 days ago

The issue can be reproduced if line breaks are present as well. 4+ lines will do the same. I added the long string as an example.