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: Fixed column width for timestamp, level & logger name #3011

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Jan 13, 2025

When using the log viewer, I have regularly noticed that the time column is wider than required, as well as the logger name column taking up much space and making the message column move if a new log with a longer logger name comes in.
This PR sets the width of the time, level and logger name columns to a fixed value and limits the logger name length to the last 40 chars, which is enough to identify the logger.

@florian-h05 florian-h05 requested a review from ghys as a code owner January 13, 2025 13:31
@florian-h05 florian-h05 force-pushed the logviewer-limit-column-width branch from 6c0597d to 6c64709 Compare January 13, 2025 13:32
Signed-off-by: Florian Hotze <[email protected]>
@florian-h05 florian-h05 force-pushed the logviewer-limit-column-width branch from 6c64709 to 876a56c Compare January 13, 2025 13:33
@florian-h05 florian-h05 changed the title Log viewer: Limit column width Log viewer: Fixed column width for timestamp, level & logger Jan 13, 2025
Copy link

relativeci bot commented Jan 13, 2025

#2705 Bundle Size — 10.98MiB (~+0.01%).

876a56c(current) vs 7ef5b6f main#2698(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 1 change
                 Current
#2705
     Baseline
#2698
No change  Initial JS 1.9MiB 1.9MiB
No change  Initial CSS 577.21KiB 577.21KiB
Change  Cache Invalidation 17.39% 17.51%
No change  Chunks 227 227
No change  Assets 250 250
No change  Modules 2951 2951
No change  Duplicate Modules 154 154
No change  Duplicate Code 1.8% 1.8%
No change  Packages 98 98
No change  Duplicate Packages 2 2
Bundle size by type  Change 2 changes Regression 2 regressions
                 Current
#2705
     Baseline
#2698
Regression  JS 9.19MiB (~+0.01%) 9.19MiB
Regression  CSS 867.1KiB (~+0.01%) 867.02KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.38KiB 1.38KiB
No change  Other 871B 871B

Bundle analysis reportBranch florian-h05:logviewer-limit-colu...Project dashboard


Generated by RelativeCIDocumentationReport issue

@florian-h05
Copy link
Contributor Author

/cc @cdjackson @ghys

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Jan 13, 2025
@florian-h05 florian-h05 changed the title Log viewer: Fixed column width for timestamp, level & logger Log viewer: Fixed column width for timestamp, level & logger name Jan 13, 2025
@cdjackson
Copy link
Contributor

Thanks - I'll take a look later today.

Just to mention I noticed a bug on the table / column widths a day or two ago. Due to the virtual table, the column widths change as you scroll up/down through the list - depending on what part of the log is displayed. This ought to fix this.

Just for info I'm working on core changes and UI changes to improve the log display. By sending logs in an array rather than single messages speeds things up a hell of a lot (I've not tried it with zigbee debug yet, but sending through 100 lines of historic logs is essentially instantaneous rather than taking maybe a few hundred ms).

@florian-h05
Copy link
Contributor Author

Just for info I'm working on core changes and UI changes to improve the log display. By sending logs in an array rather than single messages speeds things up a hell of a lot

Great to hear that and thanks for letting me know 👍

@cdjackson
Copy link
Contributor

I'm reasonably ok with this. I do find the truncation of the logger slightly annoying, but on balance it's fine.

The time column seems to change width - depending on the message. ie if the message is long, then the time column is shrunk...

image image

@florian-h05
Copy link
Contributor Author

The time column seems to change width - depending on the message. ie if the message is long, then the time column is shrunk...

That’s because this PR was developed on top of your logger icon PR, the icon will avoid that behaviour.

@mherwege
Copy link
Contributor

Instead of actually cutting the logger name, can't you do something with styling like suggested here: https://stackoverflow.com/questions/47926246/how-can-i-align-text-to-the-right-in-a-div-so-its-beginning-is-cut-down-with-ove ?

Cutting the text on the number of characters is difficult when not using a fixed width character set.

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

Successfully merging this pull request may close these issues.

3 participants