-
Notifications
You must be signed in to change notification settings - Fork 0
Code Review Bench PR #25463 - Moved to kebab-case formatting signup-form #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: base_pr_25463_20260125_3575
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||||||||
| import {SignupFormOptions} from '../AppContext'; | ||||||||||||||||||||
| import {SignupFormOptions} from '../app-context'; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| export type URLHistory = { | ||||||||||||||||||||
| type?: 'post', | ||||||||||||||||||||
|
|
@@ -17,7 +17,7 @@ export function isMinimal(options: SignupFormOptions): boolean { | |||||||||||||||||||
| * Get the URL history when the form is embedded on the site itself. | ||||||||||||||||||||
| */ | ||||||||||||||||||||
| export function getDefaultUrlHistory() { | ||||||||||||||||||||
| const STORAGE_KEY = 'ghost-history'; | ||||||||||||||||||||
| const STORAGE_KEY = "ghost-history"; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| try { | ||||||||||||||||||||
| const historyString = sessionStorage.getItem(STORAGE_KEY); | ||||||||||||||||||||
|
|
@@ -42,9 +42,7 @@ export function getUrlHistory({siteUrl}: {siteUrl: string}): URLHistory { | |||||||||||||||||||
| try { | ||||||||||||||||||||
| if (window.location.host === new URL(siteUrl).host) { | ||||||||||||||||||||
| const history = getDefaultUrlHistory(); | ||||||||||||||||||||
| if (history) { | ||||||||||||||||||||
| return history; | ||||||||||||||||||||
| } | ||||||||||||||||||||
| return history; | ||||||||||||||||||||
|
Comment on lines
44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||
| const history = getDefaultUrlHistory(); | |
| if (history) { | |
| return history; | |
| } | |
| return history; | |
| const history = getDefaultUrlHistory(); | |
| if (history) { | |
| return history; | |
| } |
- Apply suggested fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setLoading(false)causes stuck loading spinnerThe removal of
setLoading(false)on the minimal success path is a behavioral change that introduces a UI bug. When a user successfully submits the form in minimal mode:setLoading(true)is called at line 21setSuccess(true)is called at line 29, butloadingremainstrueIn
form-view.tsx, the "Email sent" text visibility depends onloading || !success(line 80) — whenloadingis stilltrue, this condition is truthy, so the "Email sent" confirmation text stays invisible. Meanwhile, the loading spinner's visibility depends on!loading(line 81) — sinceloadingis stilltrue, the spinner remains visible.Result: After successful submission in minimal mode, the user sees an infinite loading spinner instead of the "Email sent" confirmation message. The form appears to hang even though the submission succeeded.
Was this helpful? React with 👍 / 👎