Repository navigation
perf(event): resolve each event's display once per surface - #508
Merged
Merged
Conversation
EventFacts and EventChips each called useEventDisplay, and each call kept its own memo, so every card ran the resolver, its date formatting and an Intl.ListFormat twice: up to about 800 runs for a 400-row reveal. Both now take the strings their parent resolved (`strings`, plus `languages` for the chips). EventListItem, EventDetails, RegistrationView and ShareView call the hook once each. A new spec renders a card and the class page body for real and counts resolves through the ListFormat each one builds. It fails on main with 2. Closes #505 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | bb68d8a | Nov 26 2026, 09:24 PM |
…urface From the adversarial review of #508: - FactsFor and ChipsFor (src/mocks/event-surfaces.tsx) replace the wrapper copied into three files and the two near-copies; none shadows the real component's name any more. - The resolve count moves to src/test-support/count-resolves.ts, with the ListFormat assumption it rests on stated once. - The class page case moves beside EventDetails and says what it pins: its chips and facts share one resolve. The register bar and the actions still resolve for themselves, and the spec stubs them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
The session for review-pr did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
EventView already resolved the event's display for its sticky-footer check, and then EventDetails, EventRegisterBar and EventActions each resolved it again. The view's one resolve now reaches all three through `strings` on EventSurfaceProps, so the page resolves once wherever the calls to action render. RegistrationView hands its own resolve to the register bar the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`src/mocks/` holds sample data, and FactsFor and ChipsFor were the only components in it. Each story and spec now resolves its sample's strings in its own small component, as the EventDetails and EventActions stories do, so every caller follows one pattern. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/components/molecules/EventActions/EventActions.stories.tsx # src/components/molecules/EventActions/EventActions.tsx # src/components/organisms/EventDetails/EventDetails.badge.test.tsx # src/components/organisms/EventDetails/EventDetails.cta.test.tsx # src/components/organisms/EventDetails/EventDetails.stories.tsx # src/components/organisms/EventDetails/EventDetails.tsx # src/views/EventView/EventView.tsx
Ardnived
added a commit
that referenced
this pull request
Nov 26, 2026
…sign-up confirmation (#518) * feat(share): one share block and one class summary for Share and the sign-up confirmation - ShareContent is the one share block: Share opens the device's own share sheet; where there is none, or a host page refuses it, the same button opens the region's networks in a popover, in their brand colours, and the popover closes after a pick. Backing out of the sheet keeps the button. Copy link is a named button that says "Link copied" for 2.5 s, announced, and on a refused clipboard selects the link and says how to copy it by hand. - EventSummary (new molecule) is the list card's body: title with its Online tag, card facts, chips. The list card renders it in its link; Share, Register and the confirmation box it at their top (hideSubtext on the last two). EventFacts loses its boxed `summary` surface and gains hideSubtext. - The Share panel opens on the summary under "Share this class" (share.title_class); share.title goes on the retiring list. - The poster QR code row moves from Share to the bottom of the class page. - The snapshot gains the four new share keys, copied by hand from production while a full sync is blocked on #466; share.copy_link is wired again (SahajCloud#1288 re-declares it). Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(share): what Share and Copy link do under a refusing policy The Permissions Policy rows now say what each refusal does: Share opens a popover of networks, and Copy link selects the link to copy by hand. DESIGN_SYSTEM rows for EventSummary, ShareContent and the moved QrPoster, and a CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(i18n): share.title retires through SahajCloud#1290 Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(share): EventSummary takes its parent's resolved display After #508 a parent resolves an event's display once and hands the strings to its facts and chips. EventSummary follows suit, so the list card, Share and Register each still resolve once. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor: simplify per /simplify pass - CopyField moves into EventActions, its one caller, so a class page no longer loads react-share and the share block to copy a phone number; the multi-export exception for ShareContent goes with it. - The share targets' common button props are built once in PlatformButton. - EventSummary reads the resolved `display.online`; ShareButton reuses ShareContentProps; Copy link resolves its status string once. - An open fallback popover now closes from the Share button (review finding), with a spec. - Stale comments and a spec that could not fail are gone; the changelog notes the list card's Online tag. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): link the share entry to #518 Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(copy): one select-on-refusal path, in useCopy Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(actions): inline the single-use phone CopyField Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Summary
Change outline
Components — who resolves
EventFacts, EventChips, EventRegisterBar and EventActions used to call
useEventDisplaythemselves. Now the view resolves once, and each component only renders thestringsit is handed.Files — stories and specs
Each story or spec resolves its sample in its own small component, the way a view does.
Preview
No visible change. Preview pending:
main.main.Test results
EventListItem.resolve.test.tsxfails onmainwithexpected 2 to be 1.EventDetails.resolve.test.tsxrenders chips, facts, Register and the actions for real. It fails withexpected 2 to be 1onceEventActionscalls the hook again.Notes for reviewer
count-resolves.tscounts theIntl.ListFormateach resolve of a recurring class builds, and its docblock states that assumption once. Spying on the hook throughvi.mock(importOriginal)loaded a second React (useMemoof null). Spying onresolveEventDisplaythrough@/lib/shapehit a circular import from the mocks.stringsis onEventSurfaceProps, besideeventandbasePath, so EventDetails, EventRegisterBar and EventActions can't take one without the others.src/mocks/stays sample data only. A sharedFactsFor/ChipsForhelper lived there briefly. It is gone, so stories and specs follow the one pattern the views do.Closes #505
🤖 Generated with Claude Code