[refactor] Consolidate hand-rolled eyebrow labels into <Eyebrow>#2815
[refactor] Consolidate hand-rolled eyebrow labels into <Eyebrow>#2815joshestein wants to merge 19 commits into
Conversation
Replace ~100 raw heading tags across website, speed-review, availability, room and @bluedot/ui with the H1-H4 components so the consolidated defaults (semibold, leading/tracking tokens, navy) come from one place. Headings keep only semantic overrides: on-dark colors, genuinely smaller size roles, and layout classes. Dissolves the bluedot-section-heading shadow default into bare H3 and updates the stale text-component cheat sheet in apps/website/CLAUDE.md. Skipped: prose/markdown-rendered contexts (not-prose would break them), eyebrow-recipe headings (deferred to eyebrow consolidation issue), and the bespoke biosechackathon hero. Part of #2735. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collapse ~196 arbitrary leading-[...]/tracking-[...] values across the website and @bluedot/ui onto the 4-step token scales (leading tight 1.1 / snug 1.25 / normal 1.4 / relaxed 1.6; tracking tighter -0.02em / tight -0.01em / normal 0 / wide 0.04em). px values converted to ratios at their element's font size; sub-perceptual tracking (|x| <= 0.005em) deleted; classes duplicating component defaults deleted. 31 values intentionally remain: uppercase eyebrow tracking (>= 0.06em, deferred to the eyebrow consolidation issue), the bespoke biosechackathon page, and leadings used as fixed-height layout alignment. Full table in the PR description. Part of #2735. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
H1/H2 bake in InterDisplay, but the pre-sweep raw tags at these call sites rendered Inter. Downsized headings (<= text-size-lg) are not display type, so restore Inter via font-sans; the utility layer beats the component's base-layer font-family. Full-size and already- InterDisplay usages (404 hero) unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This reverts commit c2a0303.
Pre-existing H1-H4 component call sites still carried classes written against the old defaults (bold weights, explicit navy, re-stated default sizes/leadings). Now that the components bake these in, the repeats delete; near-default weight drift (font-bold on H1/H2 section titles) normalizes to semibold. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DropoutModal and FacilitatorSwitchModal rendered each numbered form section title as an H1 at body size - multiple h1s per page and a misuse of the page-title component. These are labels, not headings; use plain styled paragraphs, matching GroupSwitchModal's numbered section pattern. The modals' actual titles stay with the Modal wrapper's ModalTitle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per the typography spec, marketing heroes use the display ramp (40/56/64/72) and text-size-xl belongs to H2. HeroH1 now composes that ramp from existing tokens (2xl lg:3xl xl:4xl - each steps up once at md, so no new token is needed) instead of defaulting to xl. The homepage's inline px ramp and the lander HeroSection's deferred 48px-capped ramps delete; landers keep their weight/alignment/color choices. The external course page title drops its size override and uses the H1 default. Homepage note: the first size step moves from 680px to 768px viewports; the 680-767px band now renders 40px instead of 56px. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The homepage display-treatment h2s (CourseValueProps, MergedLadder rungs, StorySection, EventsSection) upsized to text-size-2xl, which made them the same 56px as the hero in the 768-1023px band - the H1/H2 collapse the typography spec bumped H1 to avoid. They now stay on the standard xl ramp (32-48px); the display voice (weight 500, tracking-tighter, ss04) is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
text-[32px] -> text-size-xl, text-[40px] -> text-size-2xl, and text-[14px] -> text-size-xs where the arbitrary value exactly matches an existing token. Drop text-[32px] entirely on the Congratulations H2 (it equals the H2 default). Gap-zone sizes (28px, 36px, 10px) are left as-is. Congratulations button recipes now match CTALinkOrButton's text-size-xs, which tightens their line-height from inherited 1.5 to the token's 1.2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
text-size-xl/2xl jump to 48/56px at the md breakpoint, so five sweep conversions that treated them as constant 32/40px silently grew on desktop: QuoteSection short quotes (28->48px at xl), the EventsSection date badge (sized to fit fixed-height containers), CourseCompletionSection and Congratulations H2s, and the course-unit H1. Restore the fixed px values (with their documenting eslint-disables) while keeping the weight/leading/tracking normalizations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Converts 26 uppercase label call sites across 16 files to the Eyebrow component, snapping size/weight/tracking to its defaults (text-size-xxs / font-medium / tracking-wide). Colours stay as per-site className or style overrides. Eyebrow gains id + style pass-through for the aria-labelledby target in MyBlueDotSidebar and the runtime course/accent colours in HeroSection, Congratulations, and the puzzles page. CertificateCard keeps its explicit sizes (the certificate is a fixed-proportion artifact). Heading-role eyebrows (puzzles h2s, /courses Projects, CourseSchedule sidebar), badges/pills, and AnnouncementBanner are deliberately not converted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@greptile-apps review |
Greptile SummaryThis PR consolidates website eyebrow labels onto the shared
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "[chore] Remove PR screenshots after embe..." | Re-trigger Greptile |
Closes #2795
What changed
The "uppercase + small + letter-spaced" label recipe was hand-rolled at ~26 call sites with drifting tracking (0.05–0.18em), weight (medium/semibold), and size (12–16px). This PR converts them all to
<Eyebrow>from@bluedot/ui, so they now share one voice.Eyebrowgainsid+stylepass-through:idfor thearia-labelledbytarget inMyBlueDotSidebar;stylefor runtime colours (HeroSectioncategory labels,Congratulationscourse accent, puzzles prize accent) that Tailwind classes can't express (arbitrary-value classes must be build-time literals).MutedandDynamicAccentstories.CertificateCardkeeps its explicit sizes (text-size-xs/sm) — the certificate is a fixed-proportion artifact whose labels scale with the document, not the UI ramp.Deliberately not converted
<h2 className={EYEBROW_CLASS}>section headings,/courses"Projects"<h2>, and theCourseSchedulesidebar<H2>group labels. Each is its section's only heading; converting to Eyebrow's<p>would remove them from the document outline. Decision: leave as-is rather than add anasprop. They keep their current styling until the designer question below is settled.AnnouncementBanner— non-label uppercase, out of scope per the issue.RoundGroup's inline lead-in label (mid-sentence span; a<p>would break the flow).Open questions
Whichever way these land, it's a one-line change to
Eyebrow.tsx's class string. Note the puzzles page currently shows both voices (parked h2s at 0.18em, converted prize labels at 0.04em) until then.Screenshots (after)
Homepage (ladder step labels, events, newsletter):

Puzzles winners (converted prize labels vs parked h2 eyebrows):

AGI Strategy lander ("Cohort based course" hero eyebrow):

/alumni ("More stories"):

Rapid grants mobile (stats strip + step labels):

Testing
libraries/uitypecheck failures are pre-existing (Footer/IconButton stories, Login.test — none touch Eyebrow)🤖 Generated with Claude Code