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

[Log Viewer] Adjust the table size automatically and restrict its content to the browser size #2962

Open
nelsonaponte opened this issue Jan 1, 2025 · 3 comments
Labels
enhancement New feature or request main ui Main UI

Comments

@nelsonaponte
Copy link

The problem

When a log's message is too long, it extends outside the screen or browser width forcing users to scroll right to read the full message.

image

That is inconvenient as users may not get a glance at the full log without scrolling right.

Your suggestion

The content of the full table should be bounded to the size of the browser window where the Log Viewer is loaded. By default, the width of the table should be as wide as the browser's width minus a padding. The table size and the content should be responsive. As the window's width increases (e.g., by moving it to a wider screen), the table's size should grow, and the content should be updated accordingly.

Your environment

Additional information

@nelsonaponte nelsonaponte added enhancement New feature or request main ui Main UI labels Jan 1, 2025
@cdjackson
Copy link
Contributor

IMHO there's no perfect solution here. You either word wrap and make it difficult to read, or you have to scroll. IMHO scrolling is better, and is how nearly all other log readers (that I use) work.

I think you are suggesting word wrapping the text - you've already opened a separate issue asking for word wrap so I think this is the same as #2960. As I stated there, IMHO keeping a constant line height is better rather than word wrapping. This makes it easier to see when logs are scrolling past quickly as you can "filter by eye".

The exception to this is if the log message has line feeds (eg stack traces) - in this case I agree it should wrap, but I think stack traces are about the only time this happens so it's (hopefully) pretty rare.

@nelsonaponte
Copy link
Author

It's not a big deal and it's just a suggestion.

Just for clarity, this is slightly different from #2960. This improvement means that the table cannot be wider than the browser's width, while the other improvement would allow users to resize the columns without restricting them to the browser's width.

@cdjackson
Copy link
Contributor

This improvement means that the table cannot be wider than the browser's width

So this would prevent the horizontal scrolling, which would in turn mean that it's harder for users to remove the (lesser used) left hand columns. I guess this could be resolved through making column visibility configurable, but for me that would be a pain if I wanted to (for example) hide the logger name. At the moment I can just scroll those out of view and if I want to see them, I scroll back again.

I appreciate this is probably personal taste / preference, but for me at least, fixing the width of the screen, and requiring the cells to wrap text is not a good approach for this sort of application... It might work ok if you only have low levels of logging, but when there's a lot happening, I think having the uniformity that comes with a single line is much more readable.

I have fixed the line wrap for the stack trace (and other messages that explicitly have line feeds) so I'll provide a PR for that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

No branches or pull requests

2 participants