Repository navigation
Make the panel demos live, and true to the app - #50
Merged
Merged
Conversation
The Screen tab demo had a brightness slider drawn at 100 with a knob painted at zero, and a Night Mode toggle that only wrote a caption. Both are now live: dragging the slider dims the page, and Night Mode warms it. Brightness reuses the app's own mechanism rather than approximating it. Where Perch has no backlight to move it floats a black overlay above everything, click-through, clamped at 0.85 so the slider never disappears (Brightness.swift). The page does the same with a fixed scrim. Night Mode needs two layers. Multiply takes the blue out of anything light, but against a near-black backdrop it multiplies to near-black, so the dark theme would not shift at all. A screen layer lifts red and green in the shadows, and the pair reads as one warm ramp in either theme. The slider is a real slider: pointer drag with capture, arrow and page keys, Home and End, and the ARIA a span with a click handler was missing. It is captioned "in the panel" because brightness has no shortcut — nudgeAll() in Brightness.swift is unreferenced. Also fixes the scrim being declared after the script that looks for it, which left the whole block skipped.
The demo panel had drifted from the app it claims to be a picture of. Sound was missing entirely — the headline feature of 1.9.0 was nowhere on the homepage. It is now the sixth tab, with no trace drawn, because volume is a setting rather than a measurement and the app omits the graph there too. The capability grid says plainly why there are no per-app sliders. GPU showed a ranked list of processes. Perch has no per-process GPU breakdown and never has; gpuDetail is the renderer and its thermal state. The page's own caption already said so, so the widget was contradicting the words beside it. Disk and network had the same problem in a milder form: both are value rows in the app, not bars, and network is two right-aligned columns. Only CPU and memory rank anything, so only they keep bars. Memory was tinted purple against .green in SystemMetric.tint. Also in this pass: - The panel footer read 1.8.0 in three places, through two releases. The release workflow now refuses to publish if the homepage does not name the version being tagged. - Switching metric kept the previous one's headline formatter until the next 1.5s text tick, so memory briefly rendered as a percentage. - Reduced motion drew no trace at all: the path only ever got a `d` from the animation frame, so the graph was blank for anyone who asked for less movement. - The metric tabs were divs with a click handler, unreachable by keyboard. - The Privacy section never closed its .wrap. - "4 MB" was neither the 2.5 MB download nor the 7 MB install. - `cd perch` after cloning Perch fails on a case-sensitive volume. - Privacy said two network features; downloading an update is a third. - Dropped two screenshots byte-identical to the pair the README uses.
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 things: the brightness and Night Mode controls now act on the page, and a deep audit of the homepage against the app source turned up several places where the demo showed something Perch does not do.
The controls work
The brightness slider dims the page and Night Mode warms it.
Brightness reuses the app's own mechanism rather than approximating it. Where Perch has no backlight to move it floats a black overlay above everything, click-through, clamped at 0.85 so the slider never disappears (
Brightness.swift:97). The page does the same with a fixed scrim and the same clamp.Night Mode needs two layers. Multiply takes blue out of anything light, but against a near-black backdrop it multiplies to near-black, so the dark theme would not shift at all. A screen layer lifts red and green in the shadows, and the pair reads as one warm ramp in either theme.
Both are real controls now: pointer drag with capture, arrow and page keys, Home and End, and the ARIA a span with a click handler was missing.
The demo was showing things the app does not do
Sound was missing entirely — the headline feature of 1.9.0 was nowhere on the homepage. It is now the sixth tab, with no trace drawn, because volume is a setting rather than a measurement and the app omits the graph there too.
GPU showed a ranked list of processes. Perch has no per-process GPU breakdown;
gpuDetailis the renderer and its thermal state. The page's own caption already said so, so the widget was contradicting the words next to it. Disk and network had a milder version of the same problem — both are value rows in the app, and network is two right-aligned columns. Only CPU and memory rank anything, so only they keep bars.Memory was tinted purple against
.greeninSystemMetric.tint.Bugs found on the way
dfrom the animation frame, so the graph was blank for anyone who asked for less movement..wrap.cd perchafter cloningPerchfails on a case-sensitive volume.Verified
Every tab driven in a browser in both themes: headline, caption, row shape and trace checked against the app source; brightness drag, release, keyboard and clamp; Night Mode on and off, light and dark.
Noted, not fixed
nudgeAll()inBrightness.swift:82has no callers — brightness has no shortcut, which is why the slider is captioned "in the panel". Either wire it to a hotkey or delete it.