Repository navigation
feat(class): end the class page address with its postcode, and copy it on tap - #498
Conversation
…t on tap
The class page's address adds the postcode after the town ("120 Heath St, London NW3 1DR"),
unless the street or town already holds it, and never for an online class or a listing that
hides its street. List cards and the share and sign-up summaries keep the short line.
On the class page a tap on the street address copies street, town and postcode. For two
seconds the line reads "Copied", announced to screen readers; where the clipboard is blocked
the address is selected to copy by hand. CopyField and the address share one useCopy hook.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SahajCloud#1281 replaces share.copied with one generic common.chrome.copied, shown after copying a link, a phone number or an address. Both call sites read it. The English snapshot gains the key, and loses share.copied, at the next `pnpm sync:translations --write` once #1281 is deployed; until then the snapshot spec fails on both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The postcode rule is a pure `withPostCode` beside `streetAndCity`, table-tested, and also
ignores punctuation ("NW3-1DR").
- `whereLineFull` is null where no street shows, decided once in the hook (`showsStreet`, which
the room line reads too), so EventFacts no longer re-derives it.
- `useCopy` holds one state; the address stays laid out under "Copied", so a wrapped line keeps
its height and a refused copy can still select it.
- Both copy buttons carry `data-vaul-no-drag`, so a tap on the phone sheet is not read as a drag.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…shot
SahajCloud#1281 adds common.chrome.copied ("Copied", its schema default) and retires
share.copied. A full `pnpm sync:translations --write` fails on main until #466 (compact.open),
so the key is copied in by hand, as #490 did. Merge this after #1281 is deployed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… system Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Ticketless, so judged against its own body. The postcode half is right-sized: one pure helper beside streetAndCity, one nullable field, and a panel-only gate that keeps list cards and the share summary short. The cross-repo contract holds — SahajCloud#1281 puts the string at common.chrome.copied, the snapshot mirrors it, and the hand-edit is justified while #466 blocks a full sync.
The tap-to-copy half is the question. It renders only on pages where the Directions action already works, so it buys a manual paste where a link exists — and it is what pulls in the hook, the component, 18 a11y files and a third clipboard-write entry in the host contract. Nothing in it is wrong. The case for its existence is not in the body.
Findings
should-fix— the copy button only renders where Directions already works (EventFacts.tsx:165)should-fix— Streamline: the ref and inner span only aim the selection (EventFacts.tsx:226)consider—whereLineFullnames neither the value nor the gate it carries (use-event-display.ts:52)
What was checked
Read whole on the branch: EventFacts.tsx, ShareContent.tsx, use-event-display.ts, EventActions.tsx, lib/events.ts and lib/shape/event.ts.
- The dismissed region-name fallback is unreachable:
NO_PLACE_STREETSholds'', so a blank street is vague andtownOnlyholds; with noaddress,postCodeis undefined and the line returns unchanged. - Consumer side:
postCodewas already inFEED_SELECT(config/api/fetch.ts), so the data arrives. All 18 a11y locales andcontext.jsoncarrycopy_address, and noshare.copiedcall site is left. - Producer side: SahajCloud#1281 is open; its key path and merge order match this body.
- Streamliner: 3 pieces walked, all 3 kept; of its 3 findings, 1 posted.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`whereLineFull` said neither of the two things it carries. Every other field on `EventDisplayStrings` names its content rather than an affordance, so the value-describing name is the one that fits — and the hook stays free of any opinion about the copy button. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmq4P6EV3DoqumAsr
The ref and the inner span existed only to aim the fallback selection. The button's children already are the address: the icon is `aria-hidden` with no text, and the status overlay renders only once a copy succeeded, which is the one case that never selects. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmq4P6EV3DoqumAsr
Directions opens Google Maps from the stored point, so it reaches no other maps app and carries no address text. A later reader asking why a second affordance exists beside it now finds the answer at both ends: the component, and the changelog a host reads. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYmq4P6EV3DoqumAsr
|
Three critic threads, all settled. Pushed for relay:
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | bdf196d | Nov 26 2026, 03:00 AM |
|
The newest commit, bdf196d, is sydevs-bot's own, so it is not approved on your behalf. Read it, then say 🤖 sydevs dispatcher |
A house number can read the same as a postcode, so a "street already holds it" check could hide a real postcode. The data is taken as correct; a coordinator who sees a repeated postcode on the class page fixes the street. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
Four more PRs: #496 (a class drags down to its key facts), #498 (the class address ends with its postcode and copies on tap), and the contract re-syncs #497 and #499. - `CHANGELOG.md`: #496's and #498's entries above #490's, which keeps this branch's wording. - `translations.en.json`: taken from production again with `pnpm sync:translations --write`. Since the last sync SahajCloud#1278 dropped `common.errors.captcha_blocked`, and #498's `common.chrome.copied` replaced `share.copied`. `RETIRING_KEYS` loses its last entry, the key production no longer serves. `pnpm types:cms` wrote no change. #496's ladder changes write only where the sheet can collapse, so the inline column is untouched by them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
beside it, opens Google Maps from the stored point, so the clipboard is the only route to any
other maps app — Apple Maps is the iOS default.
CopyFieldand the address share oneuseCopyhook. "Copied" moves tocommon.chrome.copied(SahajCloud#1281).Change outline
Behaviour — the where line
The hook decides once whether a street shows. The postcode is added as entered, with no duplicate check: a house number can read the same as a postcode, so coordinators fix a real repeat by eye.
Components — EventFacts
Only the default (class page) variant uses the full line, as a copy button. Compact and card keep
whereLine.EventFacts src/components/molecules/EventFacts/EventFacts.tsx location fact room line (panel only) - whereLine + panel && whereLineWithPostCode ? <CopyAddress value={whereLineWithPostCode}/> : whereLine +CopyAddress # module-private + useCopy(2000) + <button data-vaul-no-drag aria-label="Copy address: …"> + address + copy icon # kept laid out (invisible) while copied, so nothing moves + copied → "✓ Copied" overlaid + </button> + <span aria-live="polite">Copied</span> + copy refused or no clipboard → selectAllChildren(the button), to copy by hand CopyField src/components/molecules/ShareContent/ShareContent.tsx - navigator.clipboard.writeText + useState + setTimeout + useCopy(1500) # src/hooks/use-copy.ts: never throws, timer cleared on unmount + data-vaul-no-dragContract — strings and Permissions-Policy
Preview
Branch preview — it follows this PR across pushes.
?story=molecules--event-facts.Test results
.claude/skills/pr-prep/check.sh, lint + typecheck + test:run): ✓Manual verification
clipboard-write, tap the address: it should be selected. Only Chromium was available here, so WebKit and Firefox are untested.Notes for reviewer
pnpm sync:translations --writefails on main until feat(widget): open every embed inline; expand the map over the page #466 (compact.open). This follows feat(widget): keep the map on screen while data loads or fails #490's precedent.Detail
Review findings dismissed (
/code-review medium):townOnlyholds andwhereLineWithPostCodeis null.select-allalready selects the value on click.Taken from /simplify:
whereLineWithPostCodeis nullable, so EventFacts no longer re-derives the gate.useCopyholds one state.data-vaul-no-dragadded on both buttons.Skipped from /simplify:
Security review: no trigger path. The one content match was a test teardown (
innerHTML = ''), nowreplaceChildren().Payload (measured by the efficiency review): +58 B gz eager. EventFacts,
useCopyand the copy icon load lazily.🤖 Generated with Claude Code