Repository navigation
Add Hotpath, the second of the portfolio pack - #490
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Second of the three in #413. The photographer is already covered twice, by Northlight and by Weft, so this one is the developer and the architect is still to come. One site, not a pack: each lands on its own and is judged against #418 before the next starts.
Hotpath is a freelance developer paid to make one slow query fast. Nothing in it carries over to another template, which is the test #418 sets: JetBrains Mono with Public Sans appears nowhere else in the catalogue, nor does graphite with a lime accent, and the page moves once, on the opening statement, where every other template reveals each section as it arrives.
The copy names pg_stat_statements and auto_explain, a checkout taken from 2.4 seconds at p99 to 180 milliseconds across 1.1 million orders, two composite indexes and one join that stopped sorting a whole table to show twenty rows, and three weeks as the length of an engagement. The section on what he turns down, greenfield builds and migrations off Postgres and anything with platform in the title, is there because refusing work is the most characteristic thing an independent developer says. One eyebrow on the page, not one per heading, since #418 bans that label.
Measured on a production build with the repo's own verify.mjs, against the folder the export produces, at 16 scroll positions each. Headings 16.97 to 17.68:1, the eyebrow 16.04 to 16.14:1, body copy 8.76 to 8.98:1, and both calls to action 6.18:1, white on the olive accent, which is the worst number on the page. No problems and no warnings at 1440x900 or at 390x844, 16 distinct frames over the scroll, nothing scrolling sideways, no console errors, nothing requested that is not in the folder. check-export.mjs puts Lighthouse at 100 for performance and 100 for accessibility, against the 96 and 100 that #418 asks for.
The gallery card has a mean luma of 18.8, between Northlight at 16.0 and Weft at 23.3, so it reads as a card rather than a black rectangle.
Four things came out of building it.
The capture script could not produce a clean card. It hides the preview's own chrome before each shot by matching
.fixed.top-4, and that nav moved totop-3 sm:top-4in #485, so the first still came out with a Use this template button sitting in it. It now matches the nav by its label. It also takes slug arguments, because adding one template should not rewrite the other 23 stills.The home page was about to contradict itself.
PromptHerocarried a hardcodedBrowse 23 templateswhile the page around it rendered the real count fromTEMPLATES.length, so both numbers would have appeared in one render. It now takes the count as a prop the wayHeroSequencebeside it already does, and the count test that exists because this happened once before now covers the hero too.The contrast tool was overstating translucent copy, which is how the body numbers above were nearly published wrong.
verify.mjsmixed the text colour and the background in luminance space rather than compositing them in sRGB the way a screen does. For light copy on a dark frame, which is every template in the catalogue, that reads high by 1.1x to 1.5x depending on the alpha and what is behind it: hotpath's body copy came out at 12.29:1 where the pixels are 8.75:1. It now composites the channels first. The direction reverses for dark copy on a light frame, where the old maths read low, so this is not a uniform correction.Older numbers measured with it are therefore high, including weft's in #433. I re-ran weft rather than assume: worst 8.22:1, body 8.44 to 11.10:1, nothing close to failing. So both templates shipped under #418, weft and hotpath, still clear its 4.5:1 floor and only the published figures were wrong. The 22 templates that predate the epic were not re-measured.
The README claimed the export scores 100 on Lighthouse for best practices. It scores 96, and so does Weft, so that word is gone rather than left standing. Worth a look separately. The two template counts move to 24.
tsc and eslint clean, vitest 1294 of 1294.