Skip to content

fix(ui): eliminate double-blink when closing add-page dialog#1224

Merged
perber merged 2 commits into
mainfrom
fix/dialog-double-blink
Jun 28, 2026
Merged

fix(ui): eliminate double-blink when closing add-page dialog#1224
perber merged 2 commits into
mainfrom
fix/dialog-double-blink

Conversation

@perber

@perber perber commented Jun 28, 2026

Copy link
Copy Markdown
Owner

resetForm() was called inside handleCreate before returning true, causing the form reset and closeDialog() to land in the same React render — the user briefly saw empty fields before the close animation. Remove the explicit resetForm(); state resets naturally on unmount.

Also remove renderType from the DialogManager useEffect dependency array — it is only ever set by the effect, never read, causing an unnecessary second effect pass on every dialog open/close.

perber added 2 commits June 28, 2026 14:43
resetForm() was called inside handleCreate before returning true,
causing the form reset and closeDialog() to land in the same React
render — the user briefly saw empty fields before the close animation.
Remove the explicit resetForm(); state resets naturally on unmount.

Also remove renderType from the DialogManager useEffect dependency
array — it is only ever set by the effect, never read, causing an
unnecessary second effect pass on every dialog open/close.
Remove the unused resetForm dependency from AddPageDialog handleCreate.
This clears the React hooks lint warning without changing dialog behavior.
@perber
perber merged commit db742b1 into main Jun 28, 2026
9 checks passed
@perber
perber deleted the fix/dialog-double-blink branch June 28, 2026 13:49
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.

1 participant