Repository navigation
Landing page: builder-first structure, inverted bands, and a phone menu sheet - #379
Closed
IanoNjuguna wants to merge 93 commits into
Closed
IanoNjuguna wants to merge 93 commits into
IanoNjuguna wants to merge 93 commits into
Conversation
The home page opened with a section heading ("Join the Developer Experience
Initiative") and three cards about the working group. It had no h1, no call to
action above the fold, and nothing that told a builder what the docs contain.
Replace it with five blocks: a left aligned hero carrying the h1 and two CTAs, a
"Start here" card with three tasks and time estimates, four track cards that
match tracks the docs already have, an eight topic library grid, and the three
most recent working group sessions. CommunitySection keeps the GitHub data block.
All copy and every link live in src/data/landing.ts so a maintainer edits one
file. Links are site absolute and were checked against the published sitemap
before the build, because the config builds with onBrokenLinks: throw.
Colour on anchors needs !important in the module because src/css/custom.css sets
`a { color: var(--ifm-color-primary) !important }` globally, which otherwise
repaints the primary button label blue on a blue fill.
The block was centred, 2.5rem and brand blue, which read as a second design system next to the new left aligned numbered sections. Give it the same header shape (index, title, note underneath), a left aligned description, and contributor avatars aligned to the same left edge as everything else.
The home page stopped importing it in the previous commit, so the component and its stylesheet were dead code. /img/OSC-con.png stays because the brand kit page still uses it.
The community block was the only section still on the Bootstrap row/col grid, and its copy promised an issue link that was not a link. The section head and both buttons now come from the Landing stylesheet, so the block cannot drift away from 01-03 again. Avatars stop at eight and the rest collapse into a +N chip with a contributor count, so the strip holds one row at every width. The pulse card drops its gradient, hover lift, blob and text shadow for a bordered card on the surface token, and the stats read Open issues rather than labelling the openIssues value as new issues.
`a { color: var(--ifm-color-primary) !important }` outranked every CSS module
class, so in dark mode the hero CTA drew white text on the theme-lightened
blue and the quickstart titles turned brand blue. The rule stays as a default
without !important (Infima already colours prose links), and the primary
button pins the fixed brand blue so its white label holds in both themes.
The one-line note under each numbered heading repeated what the heading and the cards already said. Sections 01-04 now open with the index and the title alone, and .sectionNote goes with them.
The local-search plugin kept Infima's defaults: #EBEDF0 fill, Arial input, a #444950 magnifier and a #BEC3C9 label with the same grey for the ctrl/K hints. That is 1.51:1 on the fill, so the word Search and the shortcut were invisible and the icon read five times darker than its own label. The control is now a white 10px-radius rect with a Poppins 14px input, the magnifier drawn in the muted grey to match, and hints on surface with a border and 4px radius: 5.41:1 and 4.87:1. The navbar moves to --color-brand-primary so the header, the primary button and the floating action share one blue instead of #2555FE, #2353FF and a rgba shadow.
Extended FAB at 24px from the corner on desktop, circular 56px icon FAB at 16px on phones with the label hidden, brand blue in both themes so the white label keeps its 5.6:1, shadow from --shadow-lg instead of a 30% blue glow, hover by colour rather than a translate, and z-index 1000 instead of 9999. The stale 6rem inset reserved room for a jump-to-top control that no longer exists.
A deploy, or a rebuild behind a running server, replaces the hashed chunks. A tab open across that boundary fails its next lazy route load with ChunkLoadError and shows a dead error overlay with no way back. Root now listens for that failure on both window error and unhandledrejection and reloads the page once, rate-limited to one reload per 15 seconds in session storage so a chunk that is genuinely gone cannot turn into a reload loop.
10px was a third radius value; --radius-md is what the page's buttons already use, so the control now reads as part of the same set.
9999 was Material's FAB shape, carried in from another system. Every button on this site is --radius-md and the floating action is a button, so it now shares that radius at both sizes: a labelled control on desktop, a 56px icon control on phones. Elevation and the fixed corner carry the "floating" read, not the corner curve.
At rest the control is a 56px calendar button in the corner, so it stops covering page text. On hover, or on keyboard focus, it grows to a 184px pill and the label fades in. The button is anchored to the right, so the growth goes leftward and nothing else on the page moves. The label is display:none below 769px, which keeps touch devices on the icon, and the reveal is gated on width rather than `hover: hover` because a browser can report hover:none while a mouse is attached. Reduced motion turns both transitions off.
A solid white block at rest weighed more than the nav links it sits beside, and a translucent white fill would have put the label at 1.4-2:1 on the brand bar. So the control is a hairline outline at rest: transparent fill, white border at 40%, white magnifier and label at 92% (4.96:1 on #2353FF), shortcut hints as outlines rather than chips. Hover lifts the border to 70%. On focus-within it becomes the solid white field with the muted grey label and the surface-tinted hints, so typing never happens on a ghost. Narrow screens collapse to a square 36px chip with the magnifier centred and the placeholder hidden, both restored once the field expands.
Sui sorts its developer hub by where a builder is rather than by product, so each track card now carries a stage line under its number: new to Cardano, running a node, reading the ledger, contributing in Rust. The curated list in the repo does not change, only the label a reader matches against. GitHub Docs names its columns after what you can do, and its link lists are the same pattern as our library grid, so the topics lose their landscape nouns for capability phrases: Fundamentals becomes Addresses and transactions, Node and data becomes Running a node, Integrations becomes Backend integration. Both grids now reserve two lines for a title so the blurbs and the link lists sit on one baseline across a row. The reserve is scoped to 641px and up, since a single-column stack has nothing to align against and only pays the dead space.
Sui makes "How to ask technical questions" step two of its developer path, not the last thing on the page. Section 03 is now Get help and contribute, and the session archive moves to 04, so a reader who is stuck meets the issue link before the reading list.
Below 996px the input folds to a 36px icon chip, but the ctrl/K hints stayed inline and the pair spilled out of the navbar edge at 768px. They are hidden with the placeholder now and come back with the field on focus.
At 390px the two issue buttons wrapped into a ragged pair of different widths,
so below 640px they stack and fill the column the way the hero buttons already
do. The three pulse stats also wrapped there ("Closed issues" onto two lines,
captions out of line), so they become label-value rows under 640px.
The sessions control now portals into the navbar, and "react-dom" ships no types in this tree: react-dom has no bundled declarations and @types/react-dom was absent, so `tsc --noEmit` failed on the import.
A fixed control over full-bleed text always covers a word or a number, and no offset fixes that. Below 769px the component now portals its button into .navbar__items--right as a 36px chip matching the search control, so the page never sits under it. Desktop keeps the floating action, with the hover expansion and the scroll-away behaviour unchanged. The panel becomes a sheet under the bar on phones: fixed, 12px insets, full width to 100dvh. The search container is absolutely positioned at right:24px, so the chip is placed the same way one step further left, and the left navbar group reserves that space so the wordmark truncates instead of running underneath. The control is re-found on a navbar remount and survives route changes.
Docusaurus's own BackToTopButton sits at right:2.5rem / bottom:2rem with z-index 199, which is the same corner the floating sessions control occupies at z-index 1000: the calendar covered it completely and the arrow could not be clicked. It now stacks above it, 12px clear, with both right edges aligned. On phones the arrow was parked at bottom:4.9rem to clear the old floating pill. The sessions control moved into the navbar, so the corner is free again and the arrow drops back to a 24px inset.
The Go path already exists in the library and in the docs tree (how-to-guide/advanced/go-core-contributor), so the tracks list was the only place a builder could not find it. Blurb follows the guide: Dingo and gouroboros, testnets only, and the simplest setup of the three language paths. Hero subtitle and the track count move from four to five with it.
Five cards in one row left each card too narrow to read, and a slider that hides four of five tracks behind arrows buries the answer to "which track is mine". This is the pattern from privy.io/neobanks "Build your banking stack": one track open with its stage, name, blurb and link, the other four standing as vertical tabs with the track name set bottom-to-top, click to switch. Built on a flex row, 3rem for a closed panel and the open one taking the rest, with the width transition on flex-basis. Below 769px it stops pretending to be a slider and becomes an accordion: every track is a full-width row, the open one carries its copy. Reduced motion drops the transition.
The width jumped because the open panel animated to `flex: auto`, and auto has no length to interpolate from. It now keeps a 3rem basis and transitions flex-grow from 0 to 1 on an expo-out curve: measured 48px, 531, 727, 804, 835, 847, 852 over ~360ms. The copy sits at a fixed 30rem measure so the growing panel reveals it rather than re-wrapping it every frame. Closed strips carry a plus at the visual top, as in the reference, which clears the rotated label. On phones it sits at the end of the row instead. The track numbers are gone: the name is the label now.
Two things flipped at the instant of the click, while the panel was still at its old width: flex-direction (row to column) and the tab's writing mode (vertical to horizontal). So the closing panel briefly drew a horizontal heading inside a 1000px box, and the opening one drew a rotated label inside a 48px box, before either settled. The rail is now one object that never changes shape: it fades out on the frame the panel opens and comes back 160ms into the close, by which time the panel has narrowed. The copy is absolutely positioned at a fixed 30rem measure and clipped by the panel, so it is revealed as the panel widens instead of re-wrapping; on close it fades in 120ms, before the panel is narrow enough to fold it. Measured on click: closing 1032 -> 110, opening 48 -> 790 at 120ms, settling at 48 and 852.
Every band carried a hairline under it, including the one that meets the footer. Between two bands on the same canvas the rule is the only thing marking where a section ends, so it stays. Between the last band and the footer the surface changes colour, and there the rule drew a table border across a seam that was already visible. The footer's 3px brand bar went with it for the same reason: it was a divider at a boundary the surface change already announces.
The stack paid three different values: the hero 4rem top and 6rem bottom, the sections 6rem both ends, the footer 2rem. Below 996px two of those shrank again. Bands are set by --space-12 now, hero and footer included, and the responsive padding overrides are gone, so the gap between bands is one number at every width instead of four.
Nothing on this page animated on load or on scroll, so the entrance, stagger and word-by-word reveals the brief anticipated did not exist. What did exist was motion wrapped around controls: a slideUp keyframe on the sessions panel, hover transforms that lifted the navbar wordmark, the contributor avatars, the session rows and the panel's buttons, and a scroll listener that faded the sessions control out and back as you scrolled. All of it is gone: the keyframes, the transforms, and the listener with its hidden class. The control now stays where it is. Feedback for an action the reader takes remains: hover colours, focus rings, the control expanding to show its label, the track panel widening to the one clicked. The policy is written at the top of custom.css and every remaining transition is off under prefers-reduced-motion.
Three all-time counts with no link, two of them cumulative and the third a snapshot of right now, sitting in the same row as if comparable. The contributor strip beside it answers "is this alive?" better, with faces, and the section is about getting help, not about the repo's lifetime totals. The card, its stylesheet and the two-column grid go with it. Section 03 is now a single column: copy, the two issue links, the contributors. githubData.json still carries the stats the card used. Nothing in the site reads them; fetch-github-data.js is unchanged, so the deploy pipeline behaves exactly as before.
Cutting the pulse card without moving anything into its place left a single
narrow column of copy against half a band of white. The contributors were
already the strongest thing in that half ("will anyone pick this up?"), so they
move up into it under a "Who picks it up" label, and the strip below the buttons
goes away with the duplication.
Two columns above 996px, one below it.
…and 03 The right column needed something with a date attached, and the calendar data that drives the floating sessions control already knows when the next call is. The card shows the title, the UTC date and time, the cadence, and links to the Google Meet room and a calendar event built by the same helper the control uses. The date is resolved at build time rather than in an effect, so the card is in the server-rendered HTML and nothing shifts when the clock arrives; the trade-off is that a build runs on deploy, so "next" is as fresh as the last deploy. There is no countdown or live status, because those need the browser clock and would then disagree with the markup. Contributors go back under the buttons, where they were before the card's slot was freed.
The GitHub text link becomes the octocat glyph at 20px, inlined from the CC0 simple-icons path so it costs no request and inherits the bar's link colour (white, 5.6:1). Icon only, so the item carries aria-label and title, both "GitHub, opens in a new tab". The theme toggle is now a navbar item too, which is the fix for IntersectMBO#377 rather than the `order: -1` shortcut: it is emitted before the search field in the markup, so the row and the tab order finally agree. themeConfig.colorMode.disableSwitch turns off the built-in one, which would otherwise be appended after every right-hand item; the bar now shows one toggle at 917, search at 965, the octocat at 1221. Both items are custom types in src/theme/NavbarItem/ComponentTypes.tsx. That file imports @theme-original/NavbarItem/ComponentTypes, not @theme: inside a swizzle, @theme resolves back to the swizzle and the module initialises before it exists, which fails the build with "__WEBPACK_DEFAULT_EXPORT__ before initialization". Verified: toggle switches light to dark, the drawer carries both the toggle and the GitHub item, and one toggle renders instead of two.
Two mesures, one problem: the bar was drawn to the window instead of to the page. Infima runs the navbar full width with its own 1rem padding, so the lockup began at x=24 while the hero's first column begins at 87, and the octocat ended at 1241, 62px past the content's right edge at 1179. .navbar__inner now takes the page container's max-width, centred, at the same padding, so the two edges coincide: brand 87 against media 87, octocat 1179 against copy 1179. Inside the right cluster the gap drops from 16 to 10. Beside a 240px search field, 16px read as three separate controls rather than one group; measured gaps are now 10 and 10 between toggle, search and octocat.
The octocat moves before the search field (toggle 806, chip 848, search 951) and now
carries the repository's counts: star glyph with the star count, fork glyph with the fork
count, both 13px in tabular figures, the whole thing one link with an aria-label that
spells the numbers out ("GitHub, 13 stars and 24 forks, opens in a new tab").
The numbers are a build-time snapshot, not a runtime request: scripts/fetch-github-data.js
now also calls /repos/{owner}/{repo} and writes a `repo` block into githubData.json, with
the same preserve-on-failure rule as the rest of that script. A missing block renders the
octocat alone rather than a zero.
githubData.json gains only that block in this commit. A local run of the script also
rewrites the contributor list from the API, which is churn the repo does not want, so the
contributors and stats were restored and the diff is the six-line seed.
The gap looked wrong because it was wrong: the local-search plugin reserves 12px of padding on its container and 16px of margin on the field, so the pill's visible border sat 38px from the repo chip while toggle to chip was 10. Zeroing both brings it to 10, and the cluster now measures 10, 10, 10. Needs !important: the plugin's own stylesheet loads after custom.css and matches at the same specificity, so a plain override lost without moving anything.
The search field leads the right cluster and the mode switch takes the corner. The field is the only primary action in that group, so it reads as where the group starts; the toggle is the one control with neither a label nor a count, and a mode switch in the far corner is where every operating system and most docs sites put it. This reverses the earlier "toggle left of search". Measured: search 822 to 1034, chip 1044 to 1137, toggle 1147 to 1179, gaps 10 and 10, the cluster ending on the page's right edge.
The bar read as squeezed because .navbar__inner carried the page container's 1140px max-width, so on a wide window the items sat in a band with empty blue on both sides. That was my doing, in the name of lining the bar's items up with the page's columns. Now full-bleed: brand 24 from the left and the cluster 24 from the right at 1280, 1512 and 1920, no horizontal overflow at any of them. A wide cap was tried first (1440) and dropped, because past 1440 it reintroduces exactly the centred band it was meant to avoid. The trade, stated plainly: the bar's items no longer share an edge with the content column, which at 1920 sits 400px in from the left.
Hero subtitle now says the Developer Experience Working Group at Intersect, which is the body's actual name. Section titles become 02 Pathways, 03 Explore Cardano, 04 Become a Contributor, 05 Latest Updates. Become a Contributor is the longest at 303px at 1280 and 238px on a phone, both inside the column with no overflow; the subtitle wraps to two lines at 1280 and three at 390.
The badge marks a now-state: this session is the next one, and the card it sits on is the only place the page says "soon". Vanilla was picked for highlights, but orange is the colour we set aside for a live or now state, so the badge takes Blazing Amber and vanilla goes back to being unused on the landing page. Midnight on blazing is 5.04:1; white on blazing is 3.35:1, so the text stays dark.
The page had six bands and three backgrounds, and white against moon is 1.02:1, so the alternation it was built around was invisible. Measured, every card was the same moon fill with a 1px hairline and every section title the same 28px. It read flat because it was. 03 Explore Cardano and 05 Latest Updates are now midnight with moon text, and 04 sits white between them, so the session card and the contributors get a light island: the orange badge on midnight is only 2.34:1 of shape, which is not enough for a 12px label. The mechanism is the token pair each band already declared. .bandDark re-points the whole set on the section element, so custom properties inherit down that subtree and every component follows without knowing which surface it is on. Three values had to change with it: brand blue is 3.02:1 on midnight so links go to #4D91FF at 5.47, muted text to #9A9A9A at 6.0, borders to #3A3A3A. Session cards were transparent by design and were holes on dark, so they now read --card-bg at #262625 and lean on their border. Scanned both dark bands for text under 4.5:1 and found none. Phone at 390: bands stack, no horizontal overflow, 1576px for 03.
…shing In dark mode the page is already midnight, so a midnight band was no field at all and the rhythm disappeared: 03 and 05 came out the same colour as 01 and 04. The class now means "the inverted field", not "black". Light mode inverts to midnight, dark mode inverts to moon, with white cards, midnight text and brand blue links (5.6:1 on moon). Every component inside flips without changes, because it reads the same token names either way. Verified in the dark theme: bands resolve midnight, #2C2B2B, moon, midnight, moon; scanning every text element against its own painted background found zero under 4.5:1 across all six bands. Light mode unchanged.
…eps one colour The mark sat inside the page container, so it was clipped to 1140 and centred with blue either side, which is why it read as cramped. It is now a child of the footer itself, so it measures the footer's own width: flush left, 5px of blue at the right at 1440, 4px at 1280, 1px on a phone, and the size stays in container units at 35cqw so the word is never cut. The colour is fixed too. It was --ifm-color-primary-light, a themed token: in dark mode the footer background stays #2353FF because it is a brand token, but the wordmark would have moved to whatever Infima's dark primary-light is. Both the mark and the hairline above the legal row now read --color-brand-primary-lighter, #4F72FE, in both themes, measured identical.
…ixed cream The rim is deliberate: the footer is brand blue, so a blue button scrolling over it needs a 2px inset rim to read at all, and on white and moon bands the rim disappears, which is the whole idea. It was pinned to --color-brand-moon. That vanished in light mode as intended and turned into a bright ring around the button in dark mode, the opposite of the job. It now reads --color-background: white in light, #1D1D1B in dark, measured, so it separates the control from whatever is behind it instead of glowing.
Studied how production sites give a solid button weight: the useful part is two shadows, not
one. A tight contact shadow reads as the edge touching the page, and a wider tinted one reads
as lift. Tokens --btn-shadow, --btn-shadow-hover and --btn-shadow-active hold the three
states; the tint is brand blue so the shadow belongs to the button rather than to the band it
happens to sit on. In dark mode the contact shadow goes black, because a midnight shadow on a
midnight page is nothing.
States, on the primary CTA and on the sessions control:
rest contact shadow, no movement
hover darker fill, wider shadow, -1px on the CTA and -2px on the floating control,
which needs more travel because it has no band behind it to register one pixel
press 1px back down and 1.5% smaller, shadow tightened to the contact pair
Measured with real pointer events on the built page: CTA rest has no transform, hover
matrix(1,0,0,1,0,-1), press matrix(0.985,...,0), and the floating control -2 then 0.94. The
mobile navbar chip keeps its centring translate under the press, which a bare scale would
have dropped out of the bar.
Under prefers-reduced-motion the transforms are removed and the colour and shadow changes
stay, so the feedback survives without the travel.
Adapted from the four-shadow button recipe in the reel: inset 0 1px 0 for a lit top edge, a contact shadow, and a coloured lift. Two deviations, both deliberate. The recipe opens with a gradient fill. Skipped: the palette holds no gradients and the brand fill is fixed, so depth here comes from the edges rather than the face. The recipe's second layer is inset 0 -2px 0 dark along the bottom. Cut to nothing: that is the bevel that dates a button, and a 1px lit edge already says milled rather than printed. The coloured lift keeps the recipe's trick of a -6px spread, so the glow hugs the button instead of fogging the band behind it, which is what a plain blur does on cream. The press inverts the recipe rather than shrinking: the outside light goes, an inset dark takes its place, and the face travels 1px into the page. Scale was tried first and resampled the label, so the text went soft at exactly the moment you look at it. Measured: rest has the white inset at 0.28, hover at 0.32 with translateY(-1), press is translateY(1) with inset 0 2px 4px. Dark mode keeps the lit edge at 0.22 and pays for depth with a black contact shadow instead of a midnight one.
The rest shadow was rgba(53,83,255,0.45) at 24px blur with -6px spread, which is the reel's own bounce (it ships 60% of the button colour). On white that is not depth, it is a halo, and it also stole the only thing hover had to say. Rest is now mostly neutral: a contact shadow, a 3px/8px grey settle, and the brand tint at 0.16 on a 6px/14px blur, which reads as a hint that the button is blue rather than as light leaking out of it. Hover takes the tint to 0.40 and the blur to 12px/26px, so the colour is what hover adds. Measured on the built page: rest carries rgba(53,83,255,0.16) 0 6px 14px -6px, hover rgba(53,83,255,0.40) 0 12px 26px -6px. Dark mode keeps the same split, 0.22 at rest and 0.45 on hover, over a black contact shadow.
…t smear The global 200ms colour transition is right for hover and wrong for a theme change. Measured on the built page, a click from light to dark put band 03 at #1D1D1B within 8ms while documentElement was still white, then the page interpolated every element separately and sat at rgb(124,124,125) for a frame at 183ms before settling at 358ms. That is the jank: bands arriving in their own frames, and a flat grey wash in between. The toggle now paints the mode, then swaps inside document.startViewTransition with a flushSync, so the DOM is in its new state when the callback returns and the transition cross-fades one snapshot against the next. A .theme-switching class on html turns off the element transitions for the duration, otherwise the fade dissolves two pages that are each still animating. Without view transitions, or under prefers-reduced-motion, the swap is instant: the class is held for two frames so the browser cannot re-enable transitions before it paints. Verified: exactly 2 distinct style states during the switch instead of 5, one startViewTransition call, the class removed afterwards, and 17ms to the new theme under reduced motion.
Audited every control in both themes with :hover and :focus-visible forced through CDP, so nothing navigated. Hover and press are identical in both themes and correct: the CTA lifts -1px and presses back to +1 with the inset dark, the floating control lifts -2px and presses to 0.96. The depth tokens flip as designed, neutral rgba(29,29,27) shadows in light and black ones in dark. Two rings were wrong: The calendar control took --color-text for its ring, which in light mode is midnight, and the control floats over the midnight bands, so the ring disappeared exactly where focus mattered. The CTA ring was brand blue in both themes. On a midnight band that is 3.02, which clears the 3:1 a focus indicator needs by two hundredths, and the button itself is the same colour, so the ring read as a halo rather than an indicator. Rings now use --focus-ring, which follows the surface: brand blue on light surfaces and on caramel (4.54), the lighter blue on midnight (5.47), and the bands and hero override it to stay legible on the moon band in dark mode (brand blue, 5.04) and on caramel (brand blue, 4.54).
…buried under the toggle Measured at 390: the search container sat at 330 to 366 and the theme toggle at 334 to 366, the same 32px at the right edge, because the search field is positioned against the bar's right edge and the sessions chip 4.5rem in. Whatever item came last covered the search, and after the toggle became a navbar item that was the toggle. Search was unreachable on every phone. The right cluster is a flow row now: search, sessions, theme, 8px apart, in that order, with the lockup taking whatever width is left. The field still opens over the bar when focused, so typing never squeezes the brand out of it. Below 480 three chips plus the wordmark do not fit, so the theme switch goes to the drawer, where it already renders, and the bar keeps search and sessions. Measured: 320 logo 94 to 208, search 216, sessions 260; 600 logo 94 to 234, then 456, 500, 544. No overlaps or horizontal overflow at 320, 360, 390, 400, 430, 480 or 600. Two drawer faults surfaced with it. Its header was white and the lockup is the white version, so in light mode the brand was white on white; the header now carries the bar's blue, with the close button white on it. And the toggle was a bare icon with no row of its own, inheriting the bar's white: it now takes the menu colour, aligned with the links, and the aria-label rule that forced it white is scoped to the bar's cluster instead of all of .navbar.
… carried a fourth control
Swept 160 to 1920 in 18 steps. Two real faults, both from rules that won where they should
not have.
A nowrap strip of eight contributor avatars has a 264px min-content. Nothing could shrink it,
so the browser widened the whole document to 288 at every narrower viewport and the page
scrolled sideways: at 200 it reported scrollWidth 288 against clientWidth 200, and every
band inherited that. The strip wraps below 480 now, and 160 measures 160 with no overflow.
That is the folded-foldable and watch-size case.
The GitHub chip sets display: inline-flex, which beats Infima's .navbar__item { display: none }
at equal specificity because custom.css loads later. So the phone bar carried four controls
and the chip slid in under the lockup, which is what the screenshot showed. It is hidden in
the bar below 997 and stays in the drawer, where it is a useful row.
Two more from the same sweep: "Get started" folded onto two lines at 997 because a flex item
shrinks rather than pushes, so nav items hold one line now; and with that fixed the bar was
edge to edge at 997 to 1100, so the chip steps out there too and returns at 1101, where the
gap is 72px.
Measured clean at 160, 176, 192, 224, 240, 280, 288, 300, 320, 344, 360, 375, 390, 393, 402,
412, 428, 430, 480, 540, 600, 700, 768, 800, 900, 996, 997, 1000, 1024, 1060, 1100, 1101,
1180, 1200, 1280, 1440, 1600, 1920, and on /docs/getting-started and /docs/working-group at
320, 360, 768 and 997.
…in the drawer The lockup was capped at 140 on phones, which read as a small wordmark in a 72px bar. It now takes what the row leaves up to 180, so 36px tall at 390 instead of 28, and 114 at 320. The formula is the row minus its fixed parts, with 16px held back before the first chip: 8px read as touching, because a lockup's glint and terminal letter sit close to its own edge. The GitHub row had two faults. Infima hides .navbar__item below 997, so it vanished from the drawer as soon as the accidental display override went away, and when visible it inherited the bar's white and sat as a bare octocat with two numbers, which is what the screenshot showed. It is a menu row now: menu ink, link metrics, the octocat in currentColor, a "GitHub" label, and the counts pushed to the far end. The calendar chip also lost the 2px rim of the page colour that the floating button needs to sit over the blue footer: in the bar it read as a brighter, thicker border than the search chip beside it. Both are 1px rgba(255,255,255,0.4) now.
…cating Focused, the field grew to 200px pinned at the right edge and landed across the wordmark, so the bar showed a half-covered "De" beside a search box. It now spans from the menu button to the right padding, 62 to 351 at 375 wide, and the lockup and both chips are behind an opaque field instead of peeking out from under it. The result rows also carried a return arrow that costs about a fifth of a phone row, which is what turned every title into "Wallet Integration & Develop...". The row is the tap target, so the arrow is gone below 997 and titles read in full: "Wallet Integration Resources", "Wallet Integration & Developer Ex...", with the ellipsis doing the work only where it must. Measured: field 62 to 351, results panel 24 to 351 inside the screen, eight rows at about 55px, no horizontal overflow.
It was parked between the menu button and the chips, so with two chips on the right and one on the left it read as slightly off, and its width was whatever the flanks left it. It is out of the left group's flow and centred now: measured 0px off centre and 104/104 of space either side at 320, 105/105 at 390, at every width from 288 to 900. Infima's 8px margin-right on the logo was pushing the image 4px inside a centred box, so that goes too. Also the focused search field's offsets: they are measured against .navbar__inner's box, not the viewport, so left: padding + 38 landed at 86 and right: padding stopped 24 short, which left a sliver of the calendar chip showing beside the field. 38 and 0 put it at 62 to 366 at 390, clearing the menu button and covering the chips exactly.
Docusaurus's drawer gave 83vw of panel with four small rows and two carets: the five paths and the whole library sat behind disclosure triangles a thumb has to aim at, and the panel read as something laid over the page rather than the page continued. The replacement is a full-height sheet in the page's own surface and type: the lockup centred in a sticky header with a close button, a search row at the top, PATHs as five 56px rows with their stage beside them, Explore Cardano laid out as a labelled section per topic with its links under it, and GitHub and Theme as the last two rows. One scroll, nothing behind a caret: 35 rows, 1974px of sheet at 390. It is `theme/Navbar/MobileSidebar`, so the hamburger, the body scroll lock and the shown state all still come from Docusaurus and only the markup is ours. Details that took a pass each: the search row hands over to the bar's own field rather than growing a second one; the lockup is the ink version on light and the white version on dark, generated from the same artwork; the sheet focuses itself on open rather than the close button, which drew a focus ring the moment it appeared; rows carry no UA button border, which was the black box around the Theme row; and stage labels drop below 360 where they force every title onto two lines. The theme switch moved to components/NavbarItems/themeSwitch.ts, so the bar's toggle and the sheet's theme row share one cross-fade implementation instead of drifting apart. Checked at 320, 360, 390 and 430 in both themes: 56px rows, search 48, header 72, close on Tab, Esc closes and restores the body, desktop untouched at 1280.
Centring the lockup was only half of it. With two chips on the right and one button on the left, the lockup had to shrink to avoid touching and still ended up against the search chip, which is what the screenshot showed. The flanks had to become comparable, so both the sessions chip and the theme switch leave the bar for the whole phone range. The menu carries a DevEx Sessions row where the calendar chip was, and the theme switch is already a row there. What is left reads as a phone bar should: menu, centred lockup, search. Measured at 320 to 996: lockup 172 to 180 wide, 17/17 of space either side at 320 and 48/48 at 390, no contact, no overflow. The 3px leftward shift is deliberate: the flanks differ by 6px, a 30px button against a 36px chip, and equal space either side is what reads as centred.
Contributor
Author
|
Superseded by a two-PR stack that lands the same work in an order where each merge leaves
Closing in favour of those two. Nothing in this branch is lost: #381 carries it, and the review notes live there. |
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.
What this does
Replaces the landing page with a builder-first structure, and rebuilds the bar and the phone menu around it.
Decisions worth a reviewer's time
Bands are tokens, not colours. Each band declares
--band-bgand--card-bg;.bandAltswaps them and.bandDarkre-points the whole token set on the section element. In light mode the inverted band is midnight, in dark mode it is moon, which is what stops the rhythm disappearing when the page is already dark.The theme switch is a view transition. With the global 200ms colour transition, switching themes made the inverted bands flip in their own frame while the page around them was still light, and the page sat at
rgb(124,124,125)for a frame. Now the element transitions are suppressed for the duration and one snapshot cross-fades into the next.Buttons carry two shadows. A contact shadow for the edge and a tinted lift whose
-6pxspread hugs the button. The press travels 1px into the page with an inset dark rather than shrinking, because scale resampled the label.Focus rings follow the surface. Brand blue on white and caramel, the lighter blue on midnight, brand blue again on the moon band in dark mode. The calendar control's ring was
--color-text, which is midnight in light mode, and the control floats over the midnight bands.The phone menu is a sheet. Docusaurus's drawer put the five paths and the whole library behind carets in an 83vw panel. The sheet is one scroll with 56px rows, the search row handing over to the bar's own field, and GitHub and theme as the last two rows.
Verified
No test runner exists in this repo, so verification is
tsc --noEmit,docusaurus build, and measurement in a real browser.npx tsc --noEmitclean,npx docusaurus buildsucceeds:hoverand:activeforced, identical in both themesFollow-ups, filed separately
Notes for the reviewer
website/src/data/githubData.jsongains arepoblock (stars, forks, url) so the chip has something to render locally. The prebuild refreshes it; the rest of that file is untouched in this branch@theme/Navbar/MobileSidebar, so the hamburger, the body scroll lock and the shown state still come from Docusaurus and only the markup is ourswebsite/static/img/devex-logo-lockup-ink.pngis generated from the existing white lockup for the sheet's light surfaceCloses #377