Repository navigation
feat(components): layout blocks open on their default tab, keep every item and link, and card grids stop reflowing - #317
Open
sydevs-bot wants to merge 8 commits into
Conversation
…them react-masonry-css chose its column count in JavaScript. The server cannot know the viewport, so it rendered three columns everywhere and recounted them in componentDidMount: on a phone /inspiration painted three 103px slivers and then jumped to one column (CLS 0.0485 measured on the deployed Worker). It also dealt cards out to columns, so the DOM order, which a screen reader and the tab key follow, ran down the first column before the second. A new `masonry` utility in layouts/tailwind.css does it with CSS: one, two and three columns at `sm` and `lg` (the same 640px and 1024px bands the library used), each item packed into the shortest lane through `display: grid-lanes` inside `@supports`, and plain grid rows where a browser has no Grid Level 3. The built stylesheet keeps the `@supports` block. ContentGrid keeps its props, ref and `w-full` root; only `breakpointCols`, which no caller passed and which was the library's own setting, goes. The content-index `sizes` comment now argues from the grid's arithmetic, which gives the same 357px column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
The layout block's `titleUrl` is free text, and editors type `techniques` as readily as `/techniques`: three of the six live values are bare, on the list block of /try-our-guided-course-to-explore-deeper-concepts. With no scheme and no leading slash, `isSafeLinkHref` rightly refuses them, so `Link` drew three link-styled anchors with no href. `editorLinkHref` gives a value made only of letters, digits, `-`, `_` and slashes its leading slash, and hands every other spelling back unchanged for the link gate to judge, so a dotted host, a scheme or an anchor is never respelled into a path. It lives in lib/urls.ts because spelling a URL is that module's job. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
…past five A tabs layout block stores which tab to open on, but the carousel always started on the middle column, so /mooladhara-chakra, which lists its centre aspect first, opened a phone on "Left Aspect". `startIndex` lets the caller name the column; the middle one stays the default. SahajCloud allows twelve tabs and the carousel kept five, dropping the rest with a console warning a visitor never sees. The cap is now SahajCloud's own twelve, and from six columns, which no longer fit side by side, the carousel shows at every width instead of a desktop row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
MasonryGrid was written after wemeditate.com's `.cb-grid-layout`, the old rendering of the layout block's `grid` style, but could not render that block: it took only a heading and a body, hard-coded `h3`, gave a linked title no heading at all, dropped textarea line breaks, sliced every item past the third out of the server's HTML, and laid out through react-masonry-css. It now takes each item's optional image, title, title link and text, a `headingLevel` from its caller, and the `masonry` utility ContentGrid uses. Every item reaches the server's markup; those past the first three carry `hidden`, so they stay out of the accessibility tree and the tab order until "Show More" reveals them. The button unmounts as it does, so focus moves to the first revealed item rather than falling to <body>, and the button is described (not named, #201) by `common.a11y.show_more_items`, the existing key for exactly that count. Three is hard-coded, as on the old site, because SahajCloud's block has no count field; the default carries a `shortcut:` line. With both grids on CSS, react-masonry-css has no importer and goes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
Checked field by field against SahajCloud's LayoutBlock definition, the 18 live blocks and the old site (wemeditate.com's `.cb-grid-layout`, `.cb-columns-layout` and `.cb-accordion-layout`, and its carousel script): - `grid` renders through MasonryGrid: the /shri-mataji timeline shows three of its eleven moments and "Show More", as the old site did, and the home page's three links keep their titles inside the item headings. - `tabs` opens on `defaultTab` (/mooladhara-chakra opened on its second tab), keeps every item, and no longer links each title to its own `#anchor`: SahajCloud derives that value from the title for `defaultTab` to match, and no element carries the id, so every tab title was a dead in-page link. - `list` and `grid` read a bare-slug title link as a site path through `editorLinkHref`, so the three on /try-our-guided-course-to-explore-deeper-concepts get their hrefs. - `accordion` keeps an item's image and title link, both of which the admin offers and the mapping dropped. The title is the toggle, so the link takes its words at the foot of the panel. Two fields stay as they were, on evidence: - Tabs draw no tab UI. The old site drew these blocks as columns on a wide screen and a one-at-a-time carousel below 920px, which is what ColumnCarousel already does, so the seven chakra pages keep their look. - `useColumnsOnDesktop` is not read. All seven live tabs blocks store the field's default `false`, carried over from the old site's column blocks, so it records no editor's choice, and honouring it would turn every chakra page into one panel at a time on desktop. The converter carries a `shortcut:` line naming when to read it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
"Show More" is a click handler, so with scripting off it did nothing and eight of the eleven /shri-mataji timeline entries stayed hidden for good, against the walk-through's rule that body copy survives without JavaScript. A `(scripting: none)` rule now shows the hidden items and drops the button. It sits in `@layer base` because preflight's `[hidden]` is an `!important` there, which no later layer can override. Checked in Chrome with JavaScript off (11 items, no button) and on (3 items and the button). The count that describes the button is now `hidden` rather than `sr-only`: aria-describedby still computes it, and browse mode no longer reads it a second time after the button. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
The grid's row gap spaces rows only, while the old per-card `mb-8` also left 32px under the last card, so every content index ended 32px shorter. `pb-8` on the grid restores it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
…desktop carousel Ladle renders the story's JSDoc as its description, and it still said desktop is always a flex row and the maximum is five. A six-column section shows the carousel that now draws at every width from six columns. The layout converter's `useColumnsOnDesktop` shortcut becomes the one line the comment rule asks for; the live-data evidence behind it (all seven tabs blocks store the imported default `false`, which the old site drew as columns) lives here instead of in the code. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
Contributor
Author
|
This PR is stacked on 🤖 sydevs dispatcher |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-design | ecbfa86 | Commit Preview URL Branch Preview URL |
Nov 19 2026, 11:13 PM |
This was referenced Nov 20, 2026
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | ecbfa86 | Commit Preview URL Branch Preview URL |
Nov 19 2026, 11:13 PM |
This was referenced Nov 21, 2026
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.
Stacked on #302; GitHub retargets this PR to main when that one merges.
Summary
display: grid-lanes) the cards pack into the shortest column. Elsewhere they sit in plain grid rows.gridstyle shows the first three items and a "Show More" button, as the old site did (/shri-mataji).techniquesnow go to/techniquesinstead of rendering as dead<a>tags.react-masonry-cssis gone. Amasonry@utilityinlayouts/tailwind.cssis the only masonry implementation, andContentGridandMasonryGridboth use it.Preview
gridstyle: 3 of 11 entries and a Show More button, which reveals the other 8 and moves focus to the first one.#links.techniquesnow go to/techniques.What changed and why
layouts/tailwind.css@utility masonry;components/molecules/ContentGrid/ContentGrid.tsx)display: gridwith 1 column, 2 atsm(640px) and 3 atlg(1024px). These are the old bands.align-items: startis set, and@supports (display: grid-lanes) { display: grid-lanes }turns on lane packing.fit-toleranceis left at itsnormal(1em) default. The 2026 drafts renamed it fromflow-tolerance, which is the name Safari 26.4 shipped. Leaving it unset avoids naming a property that is still moving.refand thew-fullroot that ContentIndex animates. OnlybreakpointColsis dropped; no caller set it.gap-y-8replaces the per-cardmb-8. A newpb-8keeps the 32px that margin used to leave under the last row.sizesarithmetic ((1120−48)/3). CLS 0.0005.@supports (display:grid-lanes){.masonry{display:grid-lanes}}.ContentGrid.test.tsx"ContentGrid layout" (order, no inline styles, space under the last row) andlayouts/tailwind.test.ts"masonry".react-masonry-csswas removed withpnpm remove. Afterpnpm build,grep -rl react-masonry-css distfinds nothing.components/molecules/MasonryGrid/MasonryGrid.tsx)headingLevelis'h2' | 'h3', and a linked title sits inside its heading.initialItemCountcarryhidden, so they are out of the accessibility tree and the tab order. The count is 3, markedshortcut:because SahajCloud has no count field.common.general.show_more) reveals the rest at once, as the legacy.js-loadmoredid. Focus then moves to the first revealed<li>(tabIndex -1,focus-ring), because the button unmounts. By keyboard,:focus-visibleis true and the ring draws.common.a11y.show_more_items, an existing key. The describing span ishidden, so browse mode does not read the count a second time.MasonryGrid.test.tsx(SSR) andMasonryGrid.interaction.test.tsx(jsdom: focus move, name and description, axe clean).layouts/tailwind.css@layer base)@media (scripting: none) { [data-masonry-grid] > li[hidden] { display:block !important } [data-masonry-show-more] { display:none } }.base: preflight's[hidden]is an!importantin that layer, and no later layer can override it.tailwind.test.ts"shows every hidden MasonryGrid item and drops its button with scripting off", andMasonryGrid.test.tsx"marks the grid and its button for the no-script stylesheet".gridstyle uses MasonryGrid (components/molecules/blocks/LayoutBlock/LayoutBlock.tsx)liststays on LayoutCard, and an unknown style still falls through to grid.<li>, 8 hidden), as the legacy page does. The home page's 3 linked items show in full, with no button.text-xl font-medium tracking-wide text-gray-700, where it wastext-lg semibold gray-800. Legacy is 22px, weight 500,#7b7b7b.LayoutBlock.test.tsx"LayoutBlock grid".defaultTabdefaultTab. LayoutBlock matches it against each tab's upstream-computedtitleUrlanchor, which is the sameslugify(strict, lower)upstream applies to both. It does not use ourlib/slugify, which differs from upstream and is changing in fix(components): text boxes keep paragraph breaks and non-Latin headings get ToC anchors #304.startIndexand falls back to the middle column.#center-aspect) now opens on "Center aspect" at 390px. The deployed site opens on "Left Aspect".LayoutBlock.test.tsx(default and fallback),blockConverters.test.tsx"layout block converter",ColumnCarousel.test.tsx"ColumnCarousel start".#slug. Upstream computes that value as the tab's anchor, but no element has that id. Every tab title was a dead in-page link: the deployed /mooladhara-chakra has 6. Visible change: tab titles are plain text. Test: "does not link a title to its own anchor".editorLinkHrefat the end oflib/urls.ts. It reads a value made only of letters, digits,-,_and/as a site path (techniquesbecomes/techniques). Anything else passes through unchanged to theLinkgate, sojavascript:, hosts,#anchorand''are never respelled.lib/urls.test.ts"editorLinkHref", andLayoutBlock.test.tsx"reads a bare slug as a site path".maxRows. From 6 columns the carousel draws at every width, because 6+ columns do not fit the desktop row. 1–5 columns are unchanged.ColumnCarousel.test.tsx"keeps every column past five, in a carousel at every width", andLayoutBlock.test.tsx"keeps every tab, past five".useColumnsOnDesktop: decided not to read itfalseand no import mapping. All 18 live blocks storefalse, including the 11 that are not tabs. Sofalseis the untouched import default, not an editor's choice.shortcut:in the converter names when to honour it.columns: {slidesToShow:3, responsive:[{breakpoint:920, settings:{slidesToShow:1, initialSlide:1, dots:true, arrows:true}}]}. That is columns on desktop and a one-at-a-time carousel on mobile, which ColumnCarousel already reproduces.Not in this PR
pageBuilderGapslists the blocktitle's upstream "sticky header" behaviour. Both live uses repeat an editor heading right above them, which is an editorial fix, and a sticky title needs a design that works under the sticky site header./page#left-aspect). ColumnCarousel renders every column twice (carousel and flex row, one hidden by CSS), so ids would be duplicated. This needs ColumnCarousel to render each column once.--enable-experimental-web-platform-features: computeddisplay: grid-lanes, and items fill the shortest lane. It was not tested in Safari 26.4+.react-masonry-css: not measured. Only its absence fromdist/was checked.blocks.general.read_more, "Read more".useColumnsOnDesktopto true and backfill the 7 tabs blocks, or drop the field.Reconciled with open PRs
ContentGrid.tsx, because this PR replacesreact-masonry-cssin a file feat(components): a MeditationLibrary for the meditations index block #293 edits.ItemHeadingLevelimport, itsheadingLevelprop and its pass-through toContentCard. Its /meditations page passes onlyitems,headingLevelandsizes, so its API stays compatible.tests/a11y/page-types.test.tsx. That conflict comes from the base, not from this branch.MAX_COLUMNS, its warning effect and thecenterIndexname stay in ColumnCarousel, so fix(player): a cancelled touch ends the seek drag, and the carousels and hooks get their first tests #299'suseCarousel({ startIndex: centerIndex })picks up the default tab with no edit.editorLinkHrefsits at the end oflib/urls.ts, after feat(seo): share metadata and JSON-LD at parity with the old site #282's insertion point.blockConverters.test.tsx).blockConverters.tsxorlayouts/tailwind.css(splash loader, image credits, text-box decorations): trial merges are clean. They edit other converters and other regions of the stylesheet.Test results
Gate:
.claude/skills/pr-prep/check.sh, run on the rebased head after the review fixes.pnpm build: passes. The built CSS keeps the@supports (display:grid-lanes)block and the@media (scripting:none)rule inside@layer base.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw