Skip to content

Sample ticket: clickable materialized callouts + editor preview link#1978

Merged
maebeale merged 6 commits into
mainfrom
maebeale/clickable-callout-cards
Jul 15, 2026
Merged

Sample ticket: clickable materialized callouts + editor preview link#1978
maebeale merged 6 commits into
mainfrom
maebeale/clickable-callout-cards

Conversation

@maebeale

@maebeale maebeale commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 5 Inspect 🔬 adds an admin sample mode to the public callout controller + new preview routes; reuses shared partials/views

What is the goal of this PR and why is this important?

  • Make the event's sample ticket an honest, fully clickable preview: the admin can click into and through every callout page, seeing what registrants get — without ever touching real registrant data.

How did you approach the change?

  • Materialized-only ticket: seed built-ins on #sample_ticket, render purely from materialized rows (published by default; "Show all options" reveals unpublished).
  • Content/custom callouts link to their registration-independent detail page (return_to=sample_ticket).
  • Behavioral built-ins (payment, certificate, scholarship, CE, videoconference) link to admin-only, event-scoped preview routes (/events/:id/sample_ticket/<page>) that reuse the real callout actions/views with an unsaved sample registration.
  • SampleTicketRegistration builds that data-free "Sample Person" — nothing is ever persisted, so the preview can't read, write, or leak into counts/revenue/rosters/reminders.
  • Config gaps bypassed in preview: Guard payment/scholarship/CE ticket callouts against missing event config #1992's config_gap hides a card whose event config is incomplete; the preview shows it anyway (via a BuiltinCalloutCards preview flag) so admins can preview a published card mid-setup. Real tickets unchanged.
  • Slug-based action buttons (pay, CE license edit) are disabled in preview; back links return to the sample ticket.
  • "Preview sample ticket" link in the event editor's callouts section.

Anything else to add?

Copilot AI review requested due to automatic review settings July 14, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale force-pushed the maebeale/clickable-callout-cards branch from 2ddd467 to 08829e6 Compare July 15, 2026 05:00
Copilot AI review requested due to automatic review settings July 15, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 15, 2026 05:09
@maebeale maebeale marked this pull request as ready for review July 15, 2026 05:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 15, 2026 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 15, 2026 05:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 15, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale force-pushed the maebeale/clickable-callout-cards branch from 6113ae9 to 5894932 Compare July 15, 2026 05:59
Copilot AI review requested due to automatic review settings July 15, 2026 05:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maebeale and others added 6 commits July 15, 2026 02:10
The sample-ticket preview showed code-defined fallback cards and rendered
every card as a non-navigating div, so an admin couldn't click through to
see what a callout page looks like — and the preview could show cards a real
registrant wouldn't (built-ins are unpublished by default off facilitator
trainings).

Seed the built-ins on preview (idempotent, like #edit) so the ticket renders
purely from the event's materialized rows: published rows by default, every
row (incl. unpublished / not-yet-dripped) under "Show all options".
Content/custom callouts link to their registration-independent detail page so
admins can preview the real page; behavioral built-ins stay non-navigating
(their pages are per-registration). Add a "Preview sample ticket" link in the
event editor's callouts section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "Make your payment" built-in was recently renamed, leaving the
options=all spec asserting on stale copy. Assert on a stable built-in
("Frequently asked questions") so the test still exercises rendering
hidden built-ins against the unsaved sample's sentinel slug.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… clickable

Behavioral built-in cards (payment, forms, CE, …) link to per-registration
pages, so they only resolve for a real slug — the built sample's sentinel slug
404s, leaving them non-navigating. Prefer the event's first active
registration (name masked to "Sample Person", never persisted) so those cards
click through to live pages; fall back to the unsaved sample only when the
event has no registrations yet, where content/custom callouts still preview.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ation

Basing the preview on a real registration made behavioral cards clickable but
surfaced that registrant's live status and linked to their real pages — and
risked mutating real data. Revert to an always-unsaved, data-free sample: it
can never read from or write to a real registrant. Content/custom callouts
still preview their pages; behavioral built-in cards render non-navigating,
since their per-registration pages can't be previewed without a real slug.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Behavioral built-in cards (payment, certificate, scholarship, CE,
videoconference) link to per-registration pages that a data-free sample can't
reach. Add admin-only, event-scoped preview routes that reuse the real callout
actions/views with an unsaved sample registration (SampleTicketRegistration),
so admins can click into and through every callout page — while nothing is ever
persisted, so no real registrant data is read, written, or leaked into
counts/revenue/rosters. Slug-based action buttons (pay, license edit) are
disabled in preview, and back links return to the sample ticket.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(a cost, scholarship form, CE hours). On the sample ticket that suppressed
published cards the admin wants to preview, so a BuiltinCalloutCards preview
flag now skips the gap — the admin can see and click through the card while
still finishing the event's setup. Real tickets are unchanged (the gap still
applies).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/clickable-callout-cards branch from 5894932 to 5c8dffa Compare July 15, 2026 06:16
Copilot AI review requested due to automatic review settings July 15, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale merged commit fb1e597 into main Jul 15, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/clickable-callout-cards branch July 15, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants