docs: prepare the real landing page screenshot - #52
Open
Periicles wants to merge 3 commits into
Open
Conversation
The crop region comes from the panel's real window via CGWindowList, not from a constant, so it cannot drift from the app's geometry. Two modes because screencapture -R needs Screen Recording permission that a terminal does not have by default: capture directly when it is granted, or crop a full-screen shot taken with Cmd-Shift-5, which needs nothing. The crop maths derives pixels-per-point from the screenshot's own width rather than assuming the backing scale.
The hero is a CSS mockup, which is honest but not evidence. The image is hidden in the markup and revealed by script only once it has actually loaded, so a missing docs/assets/hero.png costs nothing: no broken image, no layout hole, and the mockup stays as the fallback — including with JavaScript off.
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.
Prep work, not a finished change: everything is in place except the screenshot itself, which needs a machine with Screen Recording permission — mine does not have it.
Safe to merge as-is. With
docs/assets/hero.pngabsent the page renders exactly as it does today, and it lights up the moment the file lands.The capture script
scripts/capture-hero.shreads the crop region from the panel's real window viaCGWindowListrather than from a constant, so it cannot drift fromScreenHelper. It adds a margin either side so the notch reads as a notch rather than as a floating black box.Two modes, because
screencapture -Rneeds Screen Recording permission a terminal does not have by default — you hit that exact failure yourself:The
--frompath derives pixels-per-point from the screenshot's own width instead of assuming the backing scale, so it is right whatever display it was taken on.The page
The
<img>shipshiddenand is revealed bymain.jsonly once it has actually loaded. A missing file therefore costs nothing — no broken image, no layout hole — and the CSS mockup stays as the fallback, including with JavaScript off. That is why this is mergeable before the asset exists.Verification
--frompath end to end on an existing full-screen shot: region computed as 780×183pt at (510,0), cropped to 1560×366px at exactly 2×. The output was not committed — it showed your calendar names and the settings menu, which is precisely the kind of thing not to publish.loadlistener plus acomplete && naturalWidthcheck for the cached case.node --checkpasses,bash -non the script passes.What is left for you
Run NotchBar during an actual event so the panel shows the in-progress state — title, times, progress bar. A shot of "No event today" would sell nothing. Then run the script, check the menu bar and event title in the frame are things you want public, and commit
docs/assets/hero.png.