-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix confirm close dialog + add restart confirm dialog #12761
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
Conversation
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:63338 This environment will automatically shut down when the PR is closed or after 5 hours. |
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.
PR Summary
Enhanced modal dialog interactions in the spreadsheet import flow with improved UX safeguards and clearer user guidance.
- Added confirmation dialog for restarting import in
MatchColumnsStep
, preventing accidental data loss with 'Restart Import' button replacing 'Back' - Implemented
shouldCloseModalOnClickOutsideOrEscape
prop in Modal component to prevent accidental closures - Simplified
SpreadSheetImportModalCloseButton
into a pure presentational component, moving dialog logic to parent - Added step-aware confirmation dialogs in
SpreadsheetImport
component, auto-closing only after import completion - Made
onClose
prop required inSpreadSheetImportModalWrapper
with mobile viewport responsiveness
5 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile
const handleClose = () => { | ||
onClose?.(); | ||
closeModal(modalId); | ||
if (shouldCloseModalOnClickOutsideOrEscape) closeModal(modalId); | ||
}; |
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.
logic: handleClose might execute onClose even when shouldCloseModalOnClickOutsideOrEscape is false, which could be unexpected. Consider moving the onClose call inside the if condition
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.
LGTM
Test:
closes : twentyhq/core-team-issues#1071