Sample ticket: clickable materialized callouts + editor preview link#1978
Merged
Conversation
2ddd467 to
08829e6
Compare
6113ae9 to
5894932
Compare
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>
5894932 to
5c8dffa
Compare
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.
🤖 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?
How did you approach the change?
#sample_ticket, render purely from materialized rows (published by default; "Show all options" reveals unpublished).return_to=sample_ticket)./events/:id/sample_ticket/<page>) that reuse the real callout actions/views with an unsaved sample registration.SampleTicketRegistrationbuilds that data-free "Sample Person" — nothing is ever persisted, so the preview can't read, write, or leak into counts/revenue/rosters/reminders.config_gaphides a card whose event config is incomplete; the preview shows it anyway (via aBuiltinCalloutCardspreview flag) so admins can preview a published card mid-setup. Real tickets unchanged.Anything else to add?
Events::CalloutsController) gains asamplemode: admin-authenticated instead of slug-public, building the in-memory sample. Real registrant pages are unchanged.