feat(account): add show_success parameter for success page before redirect #8148
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.
Summary
Add optional
show_successparameter that allows displaying the built-in success page with a "Done" button before redirecting to the redirect URL.Problem
Currently, when the
redirectparameter is provided, the account center immediately redirects after a successful operation (e.g., email update, password change). This behavior can be unfriendly as users don't get visual confirmation of the success.Solution
Add a new optional
show_successparameter:show_success=1orshow_success=trueis provided along with aredirectparameter, the user will see the success confirmation page firstshow_success, the existing behavior is preserved (immediate redirect)Usage
Files changed
packages/account/src/utils/account-center-route.ts- Add show_success parameter handlingpackages/account/src/pages/UpdateSuccess/index.tsx- Show Done button when show_success is setpackages/phrases-experience/src/locales/*/action.ts- Add "done" translation for 18 languagesTest plan
redirectwithoutshow_successstill redirects immediately after successredirectwithshow_success=1shows success page with "Done" button