Skip to content

2026 redesign: resources and every page except home - #476

Merged
veksen merged 42 commits into
nextfrom
article-figma-design
Oct 13, 2026
Merged

veksen merged 42 commits into
nextfrom
article-figma-design

Conversation

@veksen

@veksen veksen commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the Figma frame "2026 resources redesign" (tph-sketch, node 5676:392) and moves every page except the home page onto it.

 <ColumnLayout>                         layouts/ColumnLayout
-  <Sidebar> fixed full-height column
+  <WavesBanner>                        Figma banner export, fades into the page
+  <Sidebar> floating card, 2px fading border, sticky (follows scroll direction)
+    ResourcesSidebar | SpotlightsSidebar | menu only
+  <MobileHeader> + drawer below 1024px
   <main>
-    <Header>/<HeaderBarebone> image banner + boxed title
-    <PageContent>
+    <Article>                          components/Article
+      breadcrumb · 48px title · meta row (avatars, by-line, date, read time)
+      .article-prose body (18/23 Plex Sans, 39px Montserrat h2, code box)
+      sticky aside: table of contents + recommended/external links
+      footer
Page Before After
resource article, category home, resources index old header + column Article
about, rules, beginners, faq, bots old header + column Article
spotlights index + article old header + column Article (spotlights get a TOC)
resources / spotlights / site 404 centred "NOT FOUND" Article with working suggestions + link back
home unchanged unchanged

Also in this branch:

  • Colour tokens are oklch. Every converted token renders the same sRGB value as its hex, checked per token.
  • Bug fixes found along the way: TOC links on numbered headings (/rules) pointed at missing ids; markdown links broke mid-word; the drawer lost its scroll lock when a folder was expanded; the drawer stayed open, invisible, after rotating past the breakpoint; the prev/next titles rendered as solid gradient blocks; 404 suggestions were relative links, and the resources 404 never suggested anything.
  • Removed: the old column layout, Header, HeaderBarebone, PageContent, Container, Breadcrumb, StackedAvatars, FourZeroFour(Hint), their CSS, and the four header-*.png banners (292 KB).

Evidence

  • Figma match at 1440×927. I rendered a temporary page with the frame's exact text (not committed). The breadcrumb, title and every paragraph and heading row land on the frame's pixel rows (0px offset), and the code box sits at the frame's 418, 828, 677×69. The card border matches within 1/255 per channel at x=36 and x=361. The one difference is a single line that wraps on a different word, from glyph-width differences between Figma's local IBM Plex and Google Fonts.
  • TOC links. Before: on /rules, 0 of 7 entries resolved. After: all 103 built pages swept in headless Chrome: 417 TOC links, 0 broken, 0 page errors.
  • Drawer scroll lock at 900px. Before: expanding a folder reset body.style.overflow to "", so the page scrolled behind the drawer. After: it stays hidden. Widening past 1024px with the drawer open now closes it and leaves no overlay.
  • No horizontal overflow on any page type at 1440, 1440 light or 390.
  • npm run lint: 0 errors (1 existing warning). npm run build: 107 pages.

Screenshots of all 15 page types (desktop dark, desktop light, phone) were reviewed during the work. Two adversarial review passes ran over the diff and the screenshots, and every confirmed finding is fixed in this branch.

Merge Danger

Door: two-way

Visual and layout changes plus deleted dead components. Reverting the merge restores the old layout. No content model, routes or data changed, apart from one duplicate ## Beginners heading removed from beginners.md.

Blast Radius: sitewide

Every page except home changes layout, typography and mobile navigation (drawer below 1024px instead of 768px). Not checked in Safari or Firefox: watch the sticky edge fades on code blocks and the CSS round() in the banner height. Not addressed here, needs a design call:

  • Light theme: the dark brand slab in the card, the faint card border on white, dark code chips, and low-contrast role pills and prev/next link.
  • The body of the resources category homes is still the old design.
  • Home page on phones: the "Member of / JetBrains" row overflows.

🤖 Generated with Claude Code

veksen and others added 30 commits October 6, 2026 20:23
Convert the theme and static color tokens in global.css from hex to
oklch, keeping the original hex as a trailing comment. Values are
precise enough that every token renders the identical sRGB color in
the browser (verified per token via canvas), so there is no visual
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First half of the Figma "2026 resources redesign" frame, for the
resources section only (other layouts keep the fixed sidebar column).

- ColumnLayout gains a "card" variant: a 327px sidebar card 36px from
  the top-left over a full-width waves banner that fades into the page
  background. The card has its natural height (758px minimum, as in the
  frame) and stays sticky without clipping: when it is taller than the
  viewport it scrolls with the page until its bottom is in view.
- The card border is the frame's inside gradient stroke: --card-border
  at the top fading to transparent at the bottom.
- ResourcesSidebar is restyled to the card: "other resources" steps back
  up to the language list, folders toggle with a caret after the label
  (now real buttons with aria-expanded), and the current page is bold
  with opened-up tracking instead of cyan.
- New color tokens are oklch. The unused rs-* tree CSS is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second half of the "2026 resources redesign" frame, matched against
the 1440px frame: breadcrumb, title, code box and table-of-contents
boxes land on the frame's pixels.

- ResourceArticle replaces Header + PageContent on resource pages and
  resource homes: breadcrumb (sentence case, current page omitted),
  48px title, overlapping avatars with "by a and b", date and read time.
- Article body: 18px IBM Plex Sans on a 23px rhythm with -0.75px
  tracking, 39.45px Montserrat h2s, 22px inline code chips and a
  bordered code box that bleeds past the text column. Spacing is set
  with top margins only so the measured gaps do not collapse.
- Sticky aside: table of contents with a 2px bar on the current
  section, and recommended reading with gradient underlines and a
  chevron ("javascript/callbacks/intro" reads "Callbacks").
- Below 1200px the aside moves under the article and the table of
  contents is hidden; below 768px headings scale down.
- Loads IBM Plex Sans 300 and 500 for the meta line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The titles used an arbitrary `[background:...]` shorthand next to
`[-webkit-background-clip:text]`. Tailwind emits the shorthand after
the clip, which resets it, so each title rendered as a solid gradient
block. Use bg-[linear-gradient(...)] with bg-clip-text and
text-transparent, pointing at the brand gradient tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 327px sidebar card left the article about 340px wide at tablet
widths. The card layout now switches to the fixed mobile header and the
drawer below lg (1024px) instead of md, so 768px gets the full 677px
article column. Other layouts keep the md breakpoint. MobileHeader
takes the breakpoint classes as a prop, the drawer for the card is at
most 363px wide, and heading anchors clear the mobile header up to
1023px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The toggle was a clickable <div>, so it could not be reached or
activated from the keyboard and had no accessible name. Under
Tailwind's border-box preflight its 8px padding also swallowed the 9px
height, which drew the two bars on top of each other as one thick dash.
Make it a labelled <button> and size it content-box so the bars sit
5px apart inside an enlarged tap target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Table of contents items now use the sidebar card's 26px line and 4px
gap (30px per item) instead of the frame's 34.5px spacing. Also drop
the 90px heading scroll offset that cleared the fixed mobile header,
which no longer stays on screen in the card layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the card layout the mobile header now sits directly on the waves
banner and scrolls away with the page, instead of a fixed bar with a
40% background and backdrop blur over the content. Other layouts keep
the fixed bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Below 768px code blocks run edge to edge (out to the 20px gutters,
  square, no side borders), with the code aligned to the body text.
- A code block that scrolls sideways gets a fade on whichever edge has
  more to see. Markdown marks each <pre> with data-scroll-start /
  data-scroll-end (scroll listener plus ResizeObserver), and the fades
  are sticky overlays in a one-cell grid that fade in and out over
  200ms. The end fade disappears once the scroll reaches the end.
  Transitions are off under prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the sidebar card was taller than the viewport it stuck with a
negative top. Scrolling back up then left its header and the "other
resources" link hidden until the page was nearly back at the top (at
1440x760 the top 92px stayed off screen). A long table of contents
could be clipped the same way.

useScrollAwareSticky replaces the bottom-only offset: scrolling down
the element rides up until its bottom is 36px above the viewport edge,
scrolling up it rides back down until its top is 36px from the top.
It is used by the sidebar card and the article aside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every resources tree item called useLockBodyScroll(), which writes
body.style.overflow = "" during render. Expanding a folder or toggling
"other resources" in the open drawer mounted new items and wiped the
overflow lock Base UI's Dialog had set, so the article scrolled behind
the drawer. Base UI owns the lock and closing the drawer releases it,
so the tree no longer touches body styles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The drawer is hidden with CSS above lg (card layout) or md (column
layout), but its open state survived the crossing. Rotating a tablet
to landscape with the drawer open left Base UI's modal mounted: an
invisible full-screen backdrop that kept the scroll lock and swallowed
the next click. A matchMedia listener now closes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
useScrollAwareSticky wrote `top` from a passive scroll listener on
every scroll event while the card travelled between its top and bottom
stops, so the compositor could draw a frame with the old offset and the
card trailed the page on trackpad and momentum scrolling.

While travelling, the element now switches to position: relative at
its current spot and scrolls natively. Styles change only when it
reaches a stop: 2 to 5 writes per scroll leg instead of one per frame.
On a size change it holds its on-screen position, so expanding a folder
does not move the tree under the pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folder passed a new inline callback to useMatchingPath on every render.
The hook's effect depends on that callback, so it ran after each click
and re-expanded the folder that contains the current page. Pass a
stable useCallback instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fade state was only recomputed when a <pre> resized. When IBM Plex
Mono swaps in for a narrower fallback, the lines get wider but the
<pre> box keeps its size, so a block that started to overflow showed no
end fade. Also observe the <code> element and re-check once
document.fonts is ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 320px a title word wider than the 280px column, such as
"Multidimensional" in 36px Montserrat Bold, overflowed and scrolled the
whole page sideways. Add overflow-wrap: break-word to the <h1>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The meta spans used text-base and text-sm, which in Tailwind v4 set
their own line-height (24px and 20px). The row's leading-[21px] never
reached them, so a wrapped meta line, or one without the avatar stack,
was taller than designed. Use arbitrary font sizes, which set only
font-size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Inline code inside a heading was pinned to the 18px body chip size,
  so "### Addition Operator - `+`" had an 18px chip in a 31.5px
  heading. It now scales at 0.85em.
- A code box next to a heading got the full heading margin on top of
  its own border and padding: about 37px between code and the next
  heading instead of 27px. pre + heading and heading + pre now subtract
  the box like the paragraph rules do (16px and 7px).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Below 1200px the table of contents is hidden, so on a page with
headings but no recommended or external links the aside kept only a
display:none child. It stayed in the accessibility tree as an empty
complementary landmark and added 64px above prev/next (128px in all).
Hide it below 1200px when it has no links, and skip it when it has
nothing at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On /resources/javascript the breadcrumb ended with "Javascript", a
link to the page being viewed that repeated the <h1>. A top-level
folder's intro is that folder's home page, so its crumb is omitted:
Home > Resources. Articles keep their full trail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The banner was a fixed 142px with `slice`, so above 1440px the artwork
scaled up and was cut before its fade finished. That left a visible
edge under the header, worst in light theme (#EEEFF0 against white at
1920px). It now grows with the width (142/1440 of the viewport, 142px
minimum), rounded down to whole pixels so the last row does not show a
1px seam.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The exported arrow and breadcrumb chevron kept Figma's fill-opacity
(0.5 and 0.9) while also inheriting the alpha of the text they sit in,
so the "other resources" arrow drew at 25% next to 50% text. Drop the
baked-in opacity; the arrow now matches the frame's pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The theme switch label in the sidebar card (16px/400, not in the
Figma frame) used sidebar-fg at 50%: APCA Lc -41.2 on #202c36 and
+66.9 on white, where 16px/400 needs about Lc 90. At 90% it measures
Lc -90.1 in dark and passes in light, matching the frame's other
secondary text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/resources still rendered the old HeaderBarebone: a full-width
header-1440x900.png banner with a boxed title, which is not in the
Figma frame and clashed with the sidebar card. It now uses
ResourceArticle's header (breadcrumb "Home", 48px title) with the intro
in the article type. ResourceArticle takes relativePath, createdAt and
timeToRead as optional for section pages like this one; without them
the breadcrumb is just Home and the meta line is skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On /resources/404 the sidebar took "404" as the current category,
found no tree for it, and showed only an "other resources" link over
an empty card. Show the full list whenever the path matches no
language or topic, and show the back link only inside one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The article layout is about to serve site pages, spotlights and 404s
as well as resources. Rename the component to Article and its CSS
hooks from resource-prose / resource-aside / resource-link to
article-prose / article-aside / article-link. No visual change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Article now ends with the "Built with Astro - Source on GitHub" footer
itself instead of each page passing it in. The resources index, which
had no footer, gets one; the article and category-home pages render it
once, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
About, rules, beginners, FAQ, bots, the spotlights index and spotlight
articles now use the same layout as the resources section: the sticky
sidebar card over the waves banner, and Article's breadcrumb, title,
article type and table of contents. The home page is unchanged.

- PageLayout and SpotlightsLayout use the card variant. The spotlights
  card lists every spotlight under a "spotlights" heading, styled like
  the resources tree. Its links no longer call useLockBodyScroll
  (the same drawer scroll-lock bug fixed for resources).
- Article's basePath is optional; without a relativePath the
  breadcrumb is just Home.
- Spotlight titles are sentence case ("What is svelte").
- Discord role pills, written inside headings in the FAQ content, are
  set at body size instead of the heading's.
- The mobile header reads "FAQ", not "Faq".
- sentenceCase moves to utils and the card item class is shared from
  Sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The site, resources and spotlights 404s rendered the old centered
"NOT FOUND" block, and it read the same in every section. They now
use Article: a breadcrumb back to the section, a "Page / Resource /
Spotlight not found" title, the original "the sadness" line, and a
link back to the section or the home page.

Suggestions ("You may have meant") are real absolute links. Before,
they were relative (resources/...) and resolved under the missing
path. The resources 404 never suggested anything because it was given
an empty list; it now matches against every language and topic path,
so /resources/javascript/promise/intro suggests
/resources/javascript/promises/intro.md.

FourZeroFour and FourZeroFourHint are replaced by NotFound; the
Levenshtein helper moves to lib/levenshtein.ts. Article takes explicit
crumbs for pages that are not content files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The .markdown link rule used word-break: break-all, so every link
could split anywhere: "GitHu|b", "anno|uncement", "usin|g p5.js". Use
overflow-wrap: anywhere instead, which wraps at spaces and only breaks
inside a word that is wider than the column, such as a long URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
veksen and others added 12 commits October 13, 2026 05:47
When the meta row wrapped on a phone, line one ended on a dangling
"•" ("July 26, 2019 •"). Each bullet now sits in a no-wrap group with
the item after it, so a wrapped line starts with "• 2 minute read time"
instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every layout now uses the sidebar card, so the pre-redesign code has
no callers. No visual change.

- ColumnLayout, Sidebar and MobileHeader lose their "column" variant
  and the variant/className props that chose between them. The drawer
  breakpoint is lg everywhere.
- Delete Header, HeaderBarebone, PageContent, Container, Breadcrumb
  and StackedAvatars (Article's flattenTrail moves into Article), and
  the chevron-up, collapse, expand and triangle-down icons.
- Delete the CSS only they used (.header-bg, .header-sticky,
  .header-meta, .spotlight-link, .link-breadcrumb) and the four
  header-*.png banner images (292 KB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The phone header's logo and menu bars sat 32px from the edges while
  the content sat 20px in. The header now uses the content's gutters
  (20px, 32px from md), and the menu bars end on the content edge.
- Below 1200px the aside (recommended and external links) kept its
  desktop 8px inset, so it sat 8px right of the body text. It now uses
  the body column's padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29e0138 removed the CSS that only the deleted header components used,
and the range it cut also held the .card-gradient-border rule, which
the sidebar card still uses. Every page lost the card's 2px fading
border and its fill: the menu sat loose on the page, the waves showed
through the card, and the theme switch floated below an invisible box.
Put the rule back. The border again matches the Figma frame within
1/255 per channel at x=36 and x=361.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buildToc stripped a leading number from each slug, a leftover from the
Gatsby anchors. rehype-slug keeps it, so on /rules every entry linked
to a missing id ("#keep-the-learning-environment-positive" against
id="1-keep-the-learning-environment-positive"): clicking did nothing
and scrollspy never marked a current section. It also slugged only the
h2s, while rehype-slug numbers repeated slugs across all headings.
Slug every heading in order and keep the digits; all 7 rules entries
now resolve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two bars are absolutely positioned pseudo-elements with no left
offset, so they took their static position, which the button's
centred text alignment pushed 8px right: they overhung the content
edge by about 7px (362-377 against 370 at 390px). Set left: 8px so
they sit in the content box and end on the content edge (354-370).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The beginners page now shows its title as the article <h1>, and the
Markdown opened with its own "## Beginners", so the word appeared twice
in a row (three times on a phone, with the header) and led the table of
contents. Remove the Markdown heading; the intro paragraph sits under
the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A role pill in running text (the "Emergency Staff Ping" sentence on
/rules) made its line 29px instead of 23px. Pills are now exactly 23px
tall: a 17px line, 1px padding and 2px border. Headings that only
hold pills keep the body line height, except the FAQ's stacked pills
(separated by <br>), which get 30px so they don't touch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The typography plugin gives code font-weight 600. IBM Plex Mono is
loaded at 400 only, so inline chips and code boxes rendered in a
synthesized bold, heavier than the regular-weight chips in the Figma
frame. Set article code to 400.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The footer inherited the body default of 20px/26px with normal
tracking, so under 18px article text it read larger than the content,
and on a phone "GitHub" wrapped onto its own line. Use the meta row's
type: 16px/21px, -0.75px tracking, 90% foreground.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only upright weights were requested from Google Fonts, so italic text
("research _then_ ask!" on /bots, "does not" on the promises article)
was a synthesized slant that leaned into the following space. Request
italic 400 and 700 as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spotlights were the only articles without the right-hand table of
contents, which left the column beside them empty at desktop widths.
getSpotlightData now returns the headings, and SpotlightIsland passes
them to Article like resource and site pages do. A sweep of all 103
built pages finds 417 table-of-contents links, all resolving to a
heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tph ready!

Name Link
🔨 Latest commit 2dfcfab
🔍 Latest deploy log https://app.netlify.com/projects/tph/deploys/6ace1207c0af29d8e7f653f9
😎 Deploy Preview https://deploy-preview-476--tph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@veksen
veksen merged commit 0c3709a into next Oct 13, 2026
5 checks passed
@veksen
veksen deleted the article-figma-design branch October 13, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant