Repository navigation
feat(textbox): draw the old site's triangle, wash and leaf-circle ornaments on text boxes - #319
sydevs-bot wants to merge 14 commits into
Conversation
wemeditate.com drew a ring of line-drawn leaves (`.cb-image-textbox__circle`) behind the image of a page's first text box. The repo had the triangle the same blocks used, but not this one. The paths are the legacy inline SVG's, unchanged; the stroke is `currentColor`, so a text box can draw it in the `text-line-subtle` surface token instead of the legacy fixed #ebebeb. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
…page The old site hung a line-art triangle, a teal wash or a leaf circle off its text boxes. SahajCloud gives editors no field for them; the only trace is the read-only legacy `importData`, which no editor can change and which covers only imported blocks. So the site now places them itself, from what an editor sees: the order of the page's text boxes and each one's layout. Read in page order over the text boxes that render: 1. an "Ancient Wisdom" box keeps its own floral graphic and takes nothing; 2. the first box opens the page: a side box draws the circle, an overlay draws nothing; 3. after that a side box decorates its image's outer side, as the old site did (triangle when the image is on the left, wash when it is on the right), and an overlay hangs a triangle; 4. a box whose pick matches the previous box's draws nothing. On the live pages this gives the home page circle, triangle, wash, triangle, none (the old site: circle, triangle, none, triangle, wash) and /shri-mataji none then triangle and wash alternating (the old site drew 6 of the same 7). Of the 40 live text boxes, 13 carry an ornament; the old site rendered 12. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
…ntentOverlay Both organisms take an optional `decoration`. All of them are aria-hidden, take no pointer events and are hidden below `lg`, where the old site hid the overlay ones and where a stacked layout has no room beside the text. ContentTextBox anchors them to its image: the triangle hangs a third of itself off the image's outer lower corner, the wash runs teal under the image's outer side and fades out below it, and the circle sits behind the image's inner lower corner. The image now sits in a wrapper that spans the root's height from `lg` and centres it as the root did (measured: every image and box rect on /, /shri-mataji and /kundalini is identical at 375, 1024 and 1280). The wrapper gives the ornaments the image's sides but the root's bottom, because the image can overflow the root's 700px cap by up to ~75px on a 1000px-tall window; hung from the image itself, the wash reached the "Holistic approach to health" heading on /shri-mataji. From the root's bottom each ornament stays inside its own `lg:my-32` margin. `isolate` keeps the two drawn behind the image above the page background. ContentOverlay hangs the triangle off the lower corner away from its text (the left one when the text is centred), and a decorated block takes the side boxes' `lg:mb-32` bottom margin so the hanging third has room. An undecorated overlay keeps its caller's class list unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
The `textbox` converter now reads its siblings from the converter's `parent` and asks lib/textbox-decorations.ts which ornament the block draws, so every SahajCloud page gets them with no editor action. A box rendered without a parent counts as its page's only one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
The rule compares a box's pick with what the previous box drew, not with the previous box's pick, so a run of three image-left boxes alternates triangle, none, triangle. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | 9693da1 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 05:53 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-design | 9693da1 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 05:53 PM |
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
#294 replaced the hand-written `*BlockFields` interfaces with the generated `*Block` ones, so the ornament work now reads `TextBoxBlock` from `server/payload-types`. The `blockType` envelope comes with that interface, so `renderedTextBox` no longer intersects one in, and the decoration fixtures name it. Both sides' additions to the converter's import block and its `textbox` converter are kept: main's generated type, this branch's `parent` read and `textBoxDecorationAt` call. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWFS9Qzu3VyRSDarNq
|
Merged
Lean gate on the merge commit: lint 0 errors, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The ornaments are careful: aria-hidden, pointer-events-none, hidden lg:block, and anchored to a wrapper flexbox clamps to the root's max-h-[700px], so they stay inside the block's own margin. What I would push on is the 195 lines of placement rule and test behind them. SahajCloud has no decoration field, so the site re-derives the choice from page order — but importData still holds the originals, and a seeded select upstream would give parity, editor control, and none of this module. Failing that, the module is in the wrong place: lib/content-blocks.ts already owns block-fields-to-props helpers, and the converter args carry childIndex, which removes the sibling scan.
Findings
should-fix— the choice may belong upstream as a seeded field —textbox-decorations.ts:5should-fix— Streamline: fold the module intolib/content-blocks.ts, readchildIndex—:81should-fix— the triangle's markup is duplicated across both organisms,aligninverted —ContentOverlay.tsx:255consider—Pickshadows TypeScript'sPick; the no-repeat rule forces the page-wide fold —:32consider— the overlay'sdecorationternary drops a type mismatch silently —blockConverters.tsx:148consider— a story description names a source path —ContentTextBox.stories.tsx:99
What was checked
Read whole on the branch: lib/textbox-decorations.ts, both organisms, the textbox converter, RichText.tsx's debug wrapper (parent survives it), the four new tests, the story hunks, CircleDecorationSvg, lib/content-blocks.ts. payload-types.ts confirms TextBoxBlock has no decoration field. No contract surface touched, no dependency added. Streamliner: 9 pieces covered, 3 kept, both findings held. Ticketless, judged against the body. Previews unopened.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
| * Which ornament a `textbox` block draws, chosen from where it sits on a page. | ||
| * | ||
| * wemeditate.com hung a line-art triangle, a colour wash or a leaf circle off | ||
| * its text boxes. SahajCloud gives editors no field for them, so the site |
There was a problem hiding this comment.
The field this says SahajCloud lacks is the platform's own answer to "which ornament", and importData on the same block still carries the originals. A decoration select upstream, seeded from importData by a migration, would give exact parity, let an editor change one, and delete this module and its test — at the cost of a schema change, a migration and a types:cms sync. Worth settling before 195 lines land here: is this choice really not data?
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
There was a problem hiding this comment.
Your call, not mine. This stays open and I have built nothing for it.
The ticket would hold a decoration select on SahajCloud's textbox block, a migration seeding it from importData, pnpm types:cms here, then deleting the rule.
- B — its own ticket (recommended). That work is SahajCloud's, not this repo's. This PR merges and the ornaments ship meanwhile.
- A — build it here. Blocks this PR on a cross-repo change and a migration over live content.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`Pick` shadowed the built-in utility type inside the module, which `lib/content-blocks.ts` uses next door. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
…ndex lib/content-blocks.ts already owns block-fields-to-props helpers, and its header says so. The converter is handed childIndex beside parent, so the rule folds over the earlier siblings alone: no identity scan, no includes() check, and no page-wide array API. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
ContentTextBox and ContentOverlay each wrote the triangle's class list, identical but for the offset, while `align` named the image's side in one and the text's in the other — so the two ternaries read as contradicting each other. TextBoxOrnament now owns every ornament's placement and takes the side to hang it on, which each organism works out from its own layout. The overlay's triangle moves from a 2.5rem offset to the shared 1.5rem: measured at 1280 it sits 24px from the edge and 71px below the block, inside its lg:mb-32, with no horizontal overflow. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
The converter mapped TextBoxDecoration onto ContentOverlay's narrower 'triangle', so a circle or a wash would have been dropped with no type error and no test. ContentOverlay now takes the whole vocabulary and draws only the triangle, which is all the rule gives an overlay. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
A design-system reader cannot use a module path, and no story on main names one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjY86gA7R7WGrWchyRw
|
Addressed the adversarial review; head is 8edd908. Adopted — each thread carries its SHA. The rule folds into Rebutted. The no-repeat rule earns its page-wide fold: it fires on the live home page, and Open, for you. A seeded SahajCloud 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#327 reorganised lib/ by topic and moved every cross-folder import to the `@/` alias, which collided with this branch's three import blocks and left its four new files on paths that no longer resolve. Every hunk keeps both sides: main's `@/` spelling, this branch's new imports. `lib/content-blocks` is now `@/lib/content/blocks`, and `blocks.test.ts` keeps the `TextBoxBlock` type the branch added beside main's `ContentIndexBlock`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjV83ryJLF6Jfwp8dz8
|
Merged Each hunk keeps both sides: main's The rename also stranded four of this branch's new files, which git reported as clean: Gate on the merged head: lint and Prettier clean, One stale pointer left in the body above: the rule lives at 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
This approach doesn't seem to be working. We'll close this for now and revisit with a future redesign of the website |
Summary
On desktop (
lgand up), text boxes get the ornaments that wemeditate.com drew around them again: a coral line-art triangle, a soft teal wash, or the leaf circle. A visitor sees them on the home page, /shri-mataji, the chakra pages and every other page with text boxes. Editors do nothing: the site picks each ornament from the page's order of text boxes and from which side each image is on. It never picks at random and never reads the imported legacy data. Belowlgnothing changes, because the old site also hid them on narrow screens. Every ornament isaria-hiddenand takes no pointer events.Preview
Open each page at 1024px or wider; below
lgthe ornaments are hidden.What changed and why
The rule (
textBoxDecorationinlib/content-blocks.ts). The site reads the page's text boxes in order and counts only boxes that render. A box whose image is a bare id does not render, so it is skipped.The same rule is written above the function. On live data it gives 13 ornaments across 40 text boxes: 4 circles, 5 triangles and 4 washes. The old site rendered 12. The home page gets circle, triangle, wash, triangle, none; the old site had circle, triangle, none, triangle, wash. /shri-mataji gets none on its first box, then triangle and wash alternating; the old site decorated 6 of the same 7 boxes. Pinned by
lib/content-blocks.test.ts, which covers the home and /shri-mataji sequences, the no-repeat rule, ornate boxes, skipping non-textbox and bare-id nodes, the no-earlier-sibling fallback, and that an overlay is never given the circle or the wash.Components.
ContentTextBoxandContentOverlayeach getdecoration?: TextBoxDecoration, and the newTextBoxOrnamentatom draws it. It takes the decoration and the side of its positioned ancestor to hang on, so neither organism writes a class list of its own. Each ornament isaria-hidden,pointer-events-noneandhidden lg:block. An overlay draws only the triangle.teal-100under the image's outer 60%, faded out withmask-b-from-50%.text-line-subtlesurface token.relative isolate lg:grid lg:items-center lg:self-stretchwrapper, so ornaments take the image's sides but the root's bottom. The image overflows the root's 700px cap, and an earlier version anchored to the image let the wash reach the next heading on /shri-mataji.lg:mb-32. An undecorated one keeps its class list byte-for-byte.ContentTextBoxgives the triangle and the wash the image's outer side and the circle its inner one,ContentOverlaythe corner away from its text.Pinned by
ContentTextBox.decorations.test.tsx(6 tests) andContentOverlay.decorations.test.tsx(4 tests). 8 of these 10 fail against main; the 2 that pass on main are the "unchanged when undecorated" guards.Converter. The
textboxblock converter reads thechildIndexandparentit is handed, callstextBoxDecoration({ childIndex, fields, parent })and passes the result through unmapped.OrnateTextBoxis untouched. Pinned byblockConverters.decorations.test.tsx: a mixed page renders circle, triangle, wash, none (ornate), triangle, and a box with no parent gets the circle. Both tests fail against main.CircleDecorationSvgatom. This is the legacy.cb-image-textbox__circleleaf ring: 17 paths copied byte-for-byte from the live site (checked by a script), withstroke=currentColor. It is exported from the svgs barrel and shown in the Atoms / Graphics story.TriangleDecorationSvghad no consumer before this PR; both ornaments now reach the page throughTextBoxOrnament.Stories. Added a "Decorations" section to
ContentTextBox.storiesand a "Decoration" section toContentOverlay.stories. The RichText story now shows the automatic rule: circle, wash, ornate, overlay triangle.Design decisions (the user left the design open: "feels natural and imitates the old site", not a one-to-one match).
teal-100, the colour the old site used on 3 of its 4 rendered side-box washes.*.decorations.test.tsxfiles, following the*.locale.test.tsxprecedent.Visual and safety checks (Playwright against a local dev server on main's data; screenshots are in the session scratchpad):
display:noneat 320 and 375.elementsFromPointacross every intersection at 1024, 1280, 1600 and 1920. It found no ornament painted over text. The only overlaps are ornaments under an opaquebg-whitetext box, so no contrast pair needed adding totext-contrast.test.ts.lg:my-32.lg:mb-32, with horizontal overflow still 0.Review follow-up. The header comment's step 4 now describes what the code does: it compares a box's pick with what the previous box drew, not with the previous box's pick. The adversarial review then moved the rule into
lib/content-blocks.ts, gave the ornaments one drawing, and widenedContentOverlay's prop — see the summary comment on the PR.Not in this PR
importData: the user decided against it. Sidetext, spacing and the orange and gray gradient variants are not read.ContentTextBox's root islg:max-h-[700px], but its image islg:max-h-[85vh]and its box grows with long copy, so both can spill out of the root.position, which says which side the text box is on, intoimagePosition, which says which side the image is on. So every live side text box renders mirrored against the old site. The ornament rule follows the image side as it renders, so it stays natural if the data or the component is flipped later.aria-hiddenand the PR adds no strings.pnpm check:wrangler: not run. Nothing in the Worker or design config changed.Reconciled with open PRs
main. It touchedContentTextBox.tsx,ContentOverlay.tsxandContentTextBox.stories.tsx; the merge was clean in all three, and the whole suite passes on the merged head.components/organisms/RichText/blockConverters.tsx. This PR adds its import after the content-blocks import block and changes only thetextboxconverter. All of them merge cleanly.components/AGENTS.md, which this PR does not touch, and that branch is regenerated at merge time anyway.mainis merged in as of e370a55, which carries fix(components): text boxes keep paragraph breaks and non-Latin headings get ToC anchors #304, feat(seo): share metadata and JSON-LD at parity with the old site #282, feat(components): add a mobile menu, and make the compact bar the phone's header #283 and fix(ci): any lint warning fails the gate, and the repo is formatted to pass it #313.Test results
.claude/skills/pr-prep/check.shon the merged head:tsc --noEmit: passed.pnpm buildpassed on the pre-review head, and the new utilities (for examplemask-b-from-50%,lg:mb-32andtext-line-subtle) are present in the builtlayouts_tailwind-*.css. The review round changed no build input, so it was not re-run.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjZcE8bs5uRJ6dsg6kw