Repository navigation
feat(events): confirm on-chain publish in a ConfirmDialog that names the locked resale cap and royalty - #343
Merged
presidojay1 merged 2 commits intoOct 16, 2026
Conversation
…locked Publishing writes the event to the ticketing contract and can't be undone, but the review step was an inline panel that didn't mention the organizer royalty or say that the resale cap and royalty are permanent. - add ConfirmDialog: role=alertdialog + aria-modal, labelled/described, focus starts on Cancel, Tab trapped, Escape/backdrop cancel (not while loading), focus restored to the opener on close - event page: Publish opens the dialog; nothing is sent until 'Confirm and publish'; copy states that the resale cap and organizer royalty can't be changed after publishing - buildPublishSummary now includes the organizer royalty Closes StellarTickets#278
❌ Deploy Preview for stellartickets failed.
|
|
@laurastephaniee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Where things stood on
main:handlePublish()no longer publishes on click. It setsshowPublishReview, which swaps the button for an inline review panel, andconfirmPublish()only runs from that panel's "Confirm and publish" button. So "publishing starts on click" is no longer literally true. The fix the issue asks for still wasn't there:buildPublishSummary()listed name, date, venue, ticket types and resale cap, but notroyaltyBps, one of the two values the issue says must be called out.role/aria-modal, no focus move, no Escape. For a keyboard or screen-reader user the "confirmation" just appeared in the page flow, easy to Tab past or not notice, right before an irreversible wallet signature. NoConfirmDialogcomponent existed insrc/components/.What changed
Commit 1:
feat(events)New
src/components/confirm-dialog.tsx: a reusableConfirmDialogrole="alertdialog"+aria-modal="true", witharia-labelledby(title) andaria-describedby(body), so screen readers announce it as an urgent confirmation and read the warning.loading, and Cancel is disabled then too, so an in-flight publish can't be dismissed half-way.Button(variants,loading→aria-busy) and theme tokens (bg-surface,border-border,text-muted), so it matches the site.src/app/dashboard/events/[id]/page.tsxConfirmDialoginstead of swapping in the inline panel. Behaviour is unchanged otherwise: the wallet check inhandlePublish()still runs first, and nothing is sent until "Confirm and publish" calls the existingconfirmPublish().src/lib/event-details.ts:buildPublishSummary()takes an optionalroyaltyBpsand addsOrganizer royalty: 5%(via the existingformatRoyalty), defaulting to0%. The page passes the fullevent, which already hasroyaltyBps.Commit 2:
test(events)New
src/components/confirm-dialog.test.tsx(ReactcreateRoot+actin jsdom; the repo has no Testing Library):aria-modal, and the title and body are wired througharia-labelledby/aria-describedby(the body contains the "can't be changed after publishing" warning).onConfirm; Cancel and Escape callonCanceland never confirm.Publishing…witharia-busy.src/lib/event-details.test.ts: the publish summary includesOrganizer royalty: 5%next to the resale cap, and0%when unset.Testing
npx eslinton the three changed source files: clean.npx tsc --noEmit: no errors in the changed files. The only 4 errors areTS18046 'err' is of type 'unknown'insrc/lib/api-timeout.test.ts, which this PR doesn't touch.Closes #278
Closes #279
Closes #280
Closes #281