Skip to content

web: add zoom in/out for logs#4354

Merged
milas merged 4 commits into
masterfrom
milas/logs-zoom
Mar 23, 2021
Merged

web: add zoom in/out for logs#4354
milas merged 4 commits into
masterfrom
milas/logs-zoom

Conversation

@milas

@milas milas commented Mar 22, 2021

Copy link
Copy Markdown
Contributor

Add buttons next to "Clear logs" to adjust the font size for logs.

At a high-level, a CSS custom property (variable) is used to set
a % font size for log lines (the absolute font size is set on the
container, and the default property value is 100%).

This provides an easy and performant way for JS to adjust the log
font size, particularly since the actual log CSS is pure CSS from
an SCSS stylesheet, not using styled-components in React.

The scale value is read from/written to local storage under a global
(NOT Tiltfile-namespaced) key so that it's persistent and applies to
all Tilt sessions. As a bonus, that means it live synchronizes between
tabs which is kinda nifty.

2021-03-22 16 16 16

Closes #4210.

Add buttons next to "Clear logs" to adjust the font size for logs.

At a high-level, a CSS custom property (variable) is used to set
a % font size for log lines (the absolute font size is set on the
container, and the default property value is 100%).

This provides an easy and performant way for JS to adjust the log
font size, particularly since the actual log CSS is pure CSS from
an SCSS stylesheet, not using `styled-components` in React.

The scale value is read from/written to local storage under a global
(NOT Tiltfile-namespaced) key so that it's persistent and applies to
all Tilt sessions. As a bonus, that means it live synchronizes between
tabs which is kinda nifty.
@milas milas added the enhancement New feature or request label Mar 22, 2021
@milas
milas requested review from hyu, landism, maiamcc and nicks March 22, 2021 20:14
Comment thread web/src/LogActions.tsx
Comment thread web/src/LogActions.tsx
Comment thread web/src/LogActions.test.tsx Outdated
Comment thread web/src/LogActions.tsx
Comment thread web/src/LogActions.tsx Outdated
@milas
milas merged commit e5a84e4 into master Mar 23, 2021
@milas
milas deleted the milas/logs-zoom branch March 23, 2021 14:04
@maiamcc

maiamcc commented Mar 23, 2021

Copy link
Copy Markdown
Contributor

an hero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zoom into logs for effectively larger font size

3 participants