One look, and a way back out of a site - #78
Merged
Merged
Conversation
Two complaints, and the first was that the dashboard and a directory on a host were a light card UI and a dark file explorer that happened to share a suffix. They now share a palette. `dashboard.css` had four colours of its own, written as hex values no scheme had a say in, so choosing a dark theme turned the daemon's pages dark and left the dashboard white. Those are gone: every colour in it is a `var()`, the theme supplies `--bad` and `--good` from base08 and base0B -- which is what every base16 scheme paints an error and a string in -- and the palette arrives inline from the daemon and over `/_control/theme` in the extension. Sixteen hex values copied into TypeScript would be a second place for a theme to be wrong, and only one of them would be the one anybody looked at. Two smaller seams closed with it. The background moves to `html`, where the listing's stylesheet already put it: on `body` the colour stops at the content box and a short page shows the browser's white below the fold. And the dashboard asks for the palette on connect rather than only on the settings view, which is where this first lived and where almost nobody goes. The second complaint: from inside `panza.ssh-browser` there was no way back to the list of sites. It is a different origin, so the back button is the only route and only if you arrived by it. Every directory page now carries "all sites" in its header. Pages that are somebody's file get nothing added to them, which is the line this must not cross and does not. Found while wiring it: the service worker names the fields it relays one at a time -- which is what keeps a page from being handed whatever the daemon adds -- so the palette reached `getTheme` and stopped there. The e2e caught it as black text against themed text, which is the only place that could have. Two checks: the two pages resolve to the same background and foreground, and a directory says where the list of sites is. 230 tests, 65 e2e checks. Signed-off-by: Souta <shimozono-sota631@g.ecc.u-tokyo.ac.jp>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two complaints. The first: the dashboard and a directory on a host were a light card UI and a dark file explorer that happened to share a suffix.
They now share a palette
dashboard.csshad four colours of its own — hex values no scheme had a say in — so choosing a dark theme turned the daemon's pages dark and left the dashboard white. Those are gone. Every colour in it is avar(); the theme supplies--badand--goodfrom base08 and base0B, which is what every base16 scheme paints an error and a string in; and the palette arrives inline from the daemon and over/_control/themein the extension.Relayed rather than reconstructed: sixteen hex values copied into TypeScript would be a second place for a theme to be wrong, and only one of them would be the one anybody had looked at.
Two smaller seams closed with it:
html, where the listing's stylesheet already put it — onbodythe colour stops at the content box and a short page shows the browser's white below the fold;And a way back
From inside
panza.ssh-browserthere was no route to the list of sites. It is a different origin, so the back button is the only one and only if you arrived by it. Every directory page now carries all sites in its header.Pages that are somebody's file get nothing added to them. That is the line this must not cross, and does not.
Found while wiring it
The service worker names the fields it relays one at a time — which is what keeps a page from being handed whatever the daemon happens to add — so the palette reached
getThemeand stopped there. The e2e caught it asrgb(0, 0, 0)against themed text, which is the only place that could have.Checks
Two: the two pages resolve to the same background and foreground, and a directory says where the list of sites is. Compared as resolved colours rather than as CSS text, because what matters is what the pages became.
230 tests, 65 e2e checks against a real host, fmt/clippy/tsc/permission-pin clean.