Skip to content

feat(ui): share, directions and contact open from the event's action row - #540

Merged
Ardnived merged 8 commits into
mainfrom
feat/event-share-inline
Nov 27, 2026
Merged

Ardnived merged 8 commits into
mainfrom
feat/event-share-inline

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Share works from the event's action row; the Share panel (ShareView) and its route are gone.
  • Directions and Contact become menus; Register moves below the row.
  • The spinner never turned and the skeleton never pulsed: the CSS scoping pass left their keyframe names behind.

Change outline

Components — the event panel's action row

Share, Directions and Contact act in place instead of opening a drawer or a popover, and Register follows the row.

 EventDetails                                     src/components/organisms/EventDetails/EventDetails.tsx
   EventChips · EventFacts · {slot} · unverified Alert
-  EventRegisterBar
   EventActions                                   src/components/molecules/EventActions/EventActions.tsx
-    Directions  → one href (Apple on iOS, else Google)
+    DirectionsMenu   Radix DropdownMenu of directionsLinks(mapProvidersForCountry(country, isIOS()))
-    Contact     → tel: on touch, ContactPopover on desktop   (useCoarsePointer)
+    ContactMenu      host name · tel: number · WhatsApp (whatsappHref) · Copy number, every device
-    Share       → navigate(`${basePath}/share`)
+    ShareButton      native sheet, else popover of ShareTargets; hidden without useShareUrl
+  EventRegisterBar

Components — the share popover

The networks are named under their discs and closed by Copy link.

 ShareButton({ label, url, country, children, ...skin })   ShareContent.tsx
   ShareTargets({ url, title, country, onPick })            platform-buttons.tsx
-    PlatformButton  icon only, inline react-share reset patched around
+    PlatformButton  disc + name, resetButtonStyle: false, beforeOnClick: onPick
+    CopyLinkTarget  disc, says "Link copied", keeps the popover open
 ShareContent (registration confirmation) = ShareButton + full-width CopyLinkButton

Contract — routes (docs/embedding.md § URL shape unchanged)

share stays a reserved word, so an old link opens its class rather than a region called "share".

 resolveStack('/…/507/share')                     src/lib/shape/path.ts
-  [ …, event 507, { kind: 'share', eventPath } ]
+  [ …, event 507 ]
 allowedLivePreviewPaths(event)                   src/lib/live-preview/navigation.ts
-  [ page, page/register, page/share ]
+  [ page, page/register ]

Files

 src/views/
-├── ShareView/                    # the share drawer and its story
 src/lib/
-├── events.ts › directionsUrl     # one maps app
+├── maps/providers.ts             # one table of map services, regional order, WGS84 links
 src/lib/shape/href.ts
+  whatsappHref                    # international numbers only; drops extensions, trunk zeros
 src/components/molecules/
   Fallbacks  - 'share-unavailable' kind
   ShareContent/CopyFailed.tsx     # the copy-failure hint + selectable link, shared
 src/hooks/use-copy.ts             + failed
 src/components/atoms/Menu/Menu.ts + label slot

Flow — the CSS scoping pass

Tailwind 4's animate-* utilities read the keyframe from a --animate-* token, which the rename skipped.

 namespaceKeyframes(root, scope)                  scripts/postcss-scope-widget.mjs
   rename @keyframes pulse → sy-atlas-pulse
-  rewrite animation, animation-name
+  rewrite animation, animation-name, --animate-*
 keyframeFailures(root)                           scripts/assert-css-scoped.mjs
   un-namespaced @keyframes → fail
+  namespaced @keyframes no declaration names → fail

Preview

Preview pending — the app preview and the Ladle playground build after the push.

Contract impact

docs/embedding.md (CSP script-src and the clipboard-write row) and CHANGELOG.md are updated. No parameter, origin, CSP or permission changes for hosts. Neither in-tree host links to /share (checked WeMeditateWeb and SahajAtlasWordpress).

SahajCloud copy: sydevs/SahajCloud#1303 adds event.actions.copy_number and share.email, which this PR shows as hard-coded English and a borrowed label meanwhile. sydevs/SahajCloud#1290 drops share.title_class and common.errors.share_unavailable_class, listed in RETIRING_KEYS.

Test results

  • Lean gate: ✓ lint + typecheck + test:run (2,758 passed, 1 skipped)
  • Accessibility gate: ✓ 56 stories, 661 controls, clean
  • CSS gate: ✓ on a real build; ✗ as intended against the pre-fix pass (sy-atlas-spin is never referenced)
  • Browser lane: the embed-boot scenarios fail locally on origin/main too, so not judged here; CI's run is the gate

Manual verification

  1. Ladle › Molecules › Event Actions: open Directions with Region set to Russia, Korea and China, then Contact, then Share (Copy link keeps the popover open).
  2. Ladle › Views › Event: Layout = Phone sheet pins Register; Panel shows it below the row.
  3. On a phone, Share opens the system sheet; Contact's number dials.

Notes for reviewer

Detail
  • Bundle: react-share now rides the lazy class-page chunk (~17 KiB gz when a class opens), as it already did RegistrationView's. A lazy boundary around the networks was tried and dropped: it re-chunked the eager graph (+0.7 KiB gz) and took standalone over its 336 KiB budget on CI. Imported statically, standalone is 0.2 KiB under main's.
  • The CSS gate's new check flags a renamed keyframe nothing names; it found zero false hits across the build's keyframes.

🤖 Generated with Claude Code

Ardnived and others added 6 commits November 27, 2026 10:42
The scoping pass renames every @Keyframes to sy-atlas-<name> but rewrote
only animation and animation-name declarations. Tailwind 4's animation
utilities read the keyframe name from the --animate-* token, so
animate-spin and animate-pulse named keyframes that no longer existed:
the spinner never turned and the loading skeleton never pulsed.

The spinner now also stands still under prefers-reduced-motion, as the
skeleton already did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ShareView is gone. The row's Share button opens the device's share sheet,
or the region's networks in a popover, each named under its icon and
closed by a Copy link disc; it is hidden when the class has no link to
share (#115). An old <event>/share link opens the class.

Register moves below the action row. Directions becomes a menu of map
services ordered for the viewer's region and device (lib/maps/providers),
and Contact a menu of the host's name, a call link, WhatsApp and Copy
number, on every device.

The share-unavailable fallback, its stories and the share drawer's
sheet stop go with the view. The Event story gains a Layout control in
place of its sticky-Register sibling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The share targets (react-share) are their own chunk again, loaded when
  the popover opens and prefetched on the way in, so a class page no
  longer carries them.
- Map services are one table; the Directions rows are built once.
- useCopy reports failure itself; the copy-failure caption is shared.
- react-share's inline button reset is off instead of patched around.
- A WhatsApp link drops extensions and trunk zeros (whatsappHref).
- The CSS gate refuses a namespaced keyframe nothing names, the defect
  that froze the spinner and the skeleton pulse.
- Stale ShareView and share-route references, in code and docs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running
CI fix 1

recent dispatches
  • 18:20Z fix-ci · attempt 1 · session · done
  • 18:20Z fix-ci · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 27, 2026
The lazy boundary around the share networks re-chunked the eager graph
(+0.7 KiB gz standalone) and took the build over its 336 KiB budget on
CI. Imported statically, standalone is 0.2 KiB under main's; react-share
rides the lazy class-page chunk instead, as RegistrationView's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sahajatlas-design 76b765a Nov 27 2026, 06:41 PM

@Ardnived Ardnived removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@Ardnived
Ardnived merged commit 05ee47d into main Nov 27, 2026
21 checks passed
@Ardnived
Ardnived deleted the feat/event-share-inline branch November 27, 2026 19:02
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Done in SYDevelopers Technical Roadmap Nov 27, 2026
Ardnived added a commit that referenced this pull request Nov 27, 2026
With the share drawer gone (#540), every route now has a skeleton:
skeletonShape returns a shape for each, and the drawer's loading body
loses its spinner branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived added a commit that referenced this pull request Nov 28, 2026
Brings in #520–#551. Resolutions:
- ShareView stays deleted (#540); the inline split's class views are the class and its sign-up,
  and the aside under the map takes the actions, then Register, in #540's order.
- The calendar's width reads #538's `isCalendarFullWidth` off the URL; #466's
  `calendarFillsWidth` goes with Schedule-X.
- MapControls and Mapbox take both `settings` and #542's `filterMenus`; MapLayer passes the
  floating filter buttons, and DrawerStack claims them only for a sheeted stack.
- The root view's new title (#531) is a place's, so inline it gives way to the page heading.
- Main's Event "Layout" control is dropped: the Expanded form shows the phone sheet.
- The panel stays 384px, including FilterMenus' cap; translations re-synced from production.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant