Skip to content

Close the modal when its form has succeeded - #1

Merged
zelfroster merged 1 commit into
zelfroster:feat/design-systemfrom
jolavillette:fix/close-modals-on-success-for-129
Sep 19, 2026
Merged

zelfroster merged 1 commit into
zelfroster:feat/design-systemfrom
jolavillette:fix/close-modals-on-success-for-129

Conversation

@jolavillette

Copy link
Copy Markdown

Item 1 of my review on RetroShare#129.

On master every create/post/add form ended its success path with popupMessage([h3 'Success' …]), and popupMessage re-mounts #modal-container, so the form was replaced by the notice: the modal was effectively closed. This branch swaps those for toast.success(), which does not touch the modal, so the form stays open with its fields filled and its button live, and a second click creates the thing again (or re-sends the friend certificate).

Every success branch now calls widget.closePopupMessage() before the toast; failure branches keep the form open so the user can correct and retry. Sites: channel create/post, forum create/thread/reply, board create/post, add-friend Finish (both certificate kinds), identity create (signed and pseudonymous), identity edit (signed and pseudonymous), add shared directory, add file by link. The forum reply toast also says "Reply" rather than "Thread".

Checked: eslint clean, build.js --check passes. Not exercised in a browser here.

Prepared with AI assistance (Claude), driven and reviewed by me.

🤖 Generated with Claude Code

On master every create/post/add form ended its success path with
popupMessage([h3 'Success' ...]), and popupMessage re-mounts
#modal-container, so the form was replaced by the notice and the modal
was effectively closed. The design-system branch swaps those notices
for toast.success(), which does not touch the modal: the form stays
open with its fields filled and its button live, and a second click
creates the channel / forum / board / post / thread / identity again,
re-adds the shared directory or the file, or re-sends the friend
certificate.

Every success branch now calls widget.closePopupMessage() before the
toast. Failure branches keep the form open so the user can correct and
retry, as before. The forum reply toast also says "Reply" rather than
"Thread" when it was a reply.

Sites: channel create/post, forum create/thread/reply, board
create/post, add-friend Finish (both certificate kinds), identity
create (signed and pseudonymous), identity edit (signed and
pseudonymous), add shared directory, add file by link.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@zelfroster
zelfroster merged commit af75498 into zelfroster:feat/design-system Sep 19, 2026
@jolavillette
jolavillette deleted the fix/close-modals-on-success-for-129 branch September 19, 2026 03:28
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