refactor/design: adopt the updated Main-Theme visual language #5
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/main-theme-spec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Intent/Motivation/Rationale
Main-Theme was updated (
08dcd6c, "adopt refined shared system and six interactive studies") after this site last aligned with it. That revision changes the shape, elevation, typography and control language: rounded surfaces, no hard offset shadows, sentence-case labels, a wider container and the 600/850/1100 breakpoints. This PR brings Lukeh.xyz up to that spec while leaving the page structure, content and behavior untouched.Scope
static/css/main.css— tokens, base typography, header, nav, popovers, page scaffolding, inputs, buttons, notices, contact, math and stat-block demo wrapperssrc/lib/Nav.svelte— skip link, label casing in the appearance popoversrc/lib/Home.svelte,Contact.svelte,Other.svelte,Math.svelte,AgathosDemo.svelte,USTUMilestone1.svelte— scoped styles brought onto the shared tokenssrc/lib/stat-blocks/preview/stat-block.css— radii only; the serif stat-block artifact is intentionally preserved<main>elements —id="main"/tabindex="-1"as the skip-link targetUpdates/Changes
8px 8px 0offset shadows, 1152px container, 72px header, tracked uppercase classification labels, 560/820 breakpoints, 11px/12px nav and labels.Checklist
bun run check,bun run test,bun run test:e2e).btn--caps, which no longer has a useAdditional Notes
DESIGN.mdsays motion should avoid ambient loops and typewriter effects, but the home page's rotating typewriter title is existing functionality and the request was to keep functionality the same. I left it in place (it already honorsprefers-reduced-motion). Say the word and I will replace it with a static display heading in a follow-up.Pi code review
1 new actionable finding
src/lib/Nav.svelte:148Reviewed the Main-Theme visual refactor and skip-link changes, focusing on the hash-based Math page behavior. Repository inspection was read-only; tests and the PR’s visual-verification claims were not independently checked.
Change walkthrough
static/css/main.css,src/lib/Nav.svelte,src/lib/Math.svelte,src/lib/USTUMilestone1.svelte(+1 more)Review effort: 3/5.
Static observations (not validation results)
Reviewed
93802edd5babefb8b38e141a1e13d0040e39f14ewithproxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/muse-spark-1.3 → proxy/gpt-6-luna. Automated advisory review; no project commands or tests were executed.@ -145,6 +145,8 @@<svelte:window onkeydown={onWindowKeydown} onpointerdown={onWindowPointerdown} /><a class="skip-link" href="#main">Skip to content</a>[P2] Skip link resets the selected Math tool
Following the new skip link changes the URL fragment to
#main. On the Math page, the fragment-change handler interprets that as a Math route and resets the selected tool to Vector Addition.Trigger: On
/projects/math, select a non-default vector tool, then activate the Skip to content link.Impact: The user loses their current tool selection, and the fragment that preserves that selection is replaced, disrupting Math-page navigation and deep links.
Evidence:
src/lib/Nav.svelteadds<a class="skip-link" href="#main">Skip to content</a>, andsrc/lib/Math.svelteregistersreadHashforhashchange.readHashtreats any fragment other thanStatisticsas Vector Calculus and defaults an unrecognized subtab to Vector Addition; therefore#mainresets the selection. No guard excludes the skip-link fragment.Fixed in
453b51b. The skip link changes the URL hash to#main, and the Math page treated every unrecognized hash as a reset. It now ignores in-page anchors that are not tool routes, so the selected tool survives skipping to content. Added e2e coverage for the skip link target and for preserving the Math selection.Pi code review
1 new actionable finding
static/css/main.css:564Earlier findings: 1 rechecked
src/lib/Nav.svelte:148, first reported in review #507) — src/lib/Math.svelte now returns early from readHash when the fragment is empty or 'main', before updating the selected tool. The added e2e test also checks that selecting Cross Product remains intact after activating the skip link.Outside the diff
[P2] Skip link can place the page heading behind the sticky header
The skip link targets the top of
, but fragment navigation does not account for the sticky header. The main content's top padding can be shorter than the header, leaving the heading obscured after the link is activated.Trigger: A keyboard user activates the Skip to content link on a page with the sticky header, particularly at viewports where the header wraps and grows taller.
Impact: The skip link can land users with the page heading hidden behind the header, reducing the usefulness of this accessibility feature.
Evidence: The new skip link in src/lib/Nav.svelte targets #main, and page components add that target to
. In static/css/main.css, .site-header is sticky and the main content uses top padding of clamp(32px, 6vw, 64px), reduced to 32px at widths up to 850px. The candidate review found no scroll-margin or scroll-padding rule to offset fragment navigation for the header.Location:
static/css/main.css:564(outside the diff; posted here because it can't anchor inline).Reviewed the visual-language refactor, skip-link changes, and Math hash handling. The candidate reviews report no checks run, and only one identified issue is supported by a candidate review.
Change walkthrough
static/css/main.css,src/lib/Nav.svelte,src/lib/Math.svelte,src/libtests/e2e/navigation.spec.tsReview effort: 3/5.
Static observations (not validation results)
Reviewed
453b51b073e5ccb1f50d6a95d9ad5999a348476bwithproxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/muse-spark-1.3 → proxy/gpt-6-luna. Automated advisory review; no project commands or tests were executed.Fixed in
64a47df. Page targets now use a scroll margin of the header height plus 16px (68px above 850px, 109px for the wrapped header at and below it), and a phone-viewport e2e assertion checks that the heading clears the header after activating the skip link.Pi code review
1 new actionable finding
src/lib/Math.svelte:94Earlier findings: 1 rechecked
static/css/main.css:564, first reported in review #508) — static/css/main.css now sets main { scroll-margin-top: calc(var(--header-height) + 16px); }, with --header-height set to 68px and overridden to 109px at widths up to 850px, where the header wraps. The new navigation test also checks heading clearance at 390px.Reviewed the visual-language refactor, skip-link behavior, and Math hash handling using the supplied diff and candidate reviews. Checks were not independently run; the review was limited to static evidence in the supplied materials and current Math component code.
Change walkthrough
static/css/main.css,src/lib/Nav.svelte,src/lib/Math.sveltetests/e2e/navigation.spec.tsReview effort: 3/5.
Static observations (not validation results)
Reviewed
64a47df4558200c60b0defa872d6c32e8bf51a8fwithproxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/muse-spark-1.3 → proxy/gpt-6-luna. Automated advisory review; no project commands or tests were executed.@ -91,1 +91,4 @@const raw = decodeURIComponent(location.hash.replace(/^#/, ''));// In-page anchors such as the skip link's #main are not tool routes;// leave the current selection alone instead of resetting it.if (!raw || raw === 'main') return;[P2] Using the skip link can make the Math tab reset the selected tool
After the skip link changes the URL hash to #main, clicking the Vector Calculus main tab parses that anchor as if it were a tool route and falls back to Vector Addition, discarding the selected tool.
Trigger: On the Math page, select a vector tool such as Cross Product, activate Skip to content, then click the Vector Calculus main tab.
Impact: The selected tool and its results are lost during ordinary navigation after using the skip link, contrary to the stated intent to preserve Math behavior.
Evidence: In src/lib/Math.svelte,
readHashreturns forraw === 'main', butselectMainseparately parses the hash and setstabto Vector Addition unless it matches a vector-tool route. The new e2e test checks selection immediately after skip-link activation but not after clicking the main tab.Fixed in
8a81753. The Math page now replaces the skip link's#mainfragment with the current tool hash, so the main-tab handler resolves the same tool instead of falling back to Vector Addition. The e2e test now checks the full path: select Cross Product → skip to content → switch main tabs.Pi code review
0 new actionable findings
No new actionable findings. Previously reported issues, if any, are tracked below.
Earlier findings: 1 rechecked
src/lib/Math.svelte:94, first reported in review #512) — Current src/lib/Math.svelte handles raw === 'main' in readHash by calling setHash with the current Math route before returning. Candidate reviews report that the navigation e2e test also selects Cross Product, activates the skip link, clicks the Vector Calculus tab, and verifies Cross Product remains selected.Aggregated the candidate reviews of the Main-Theme refactor and its skip-link/Math navigation changes; no new evidence-supported defects were reported. Checks were not run, and this review relies on the candidate reviews’ current-code evidence.
Change walkthrough
static/css/main.css,src/lib/Nav.svelte,src/lib/Math.sveltetests/e2e/navigation.spec.tsReview effort: 3/5.
Static observations (not validation results)
Reviewed
8a817531caea883296c626b7626f7937d179ca62withproxy/glm-5.3-flash + proxy/deepseek-v4.1-flash + proxy/muse-spark-1.3 → proxy/gpt-6-luna. Automated advisory review; no project commands or tests were executed.