Custom Dialogs - #117
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces native window.confirm/alert flows with custom stylized dialogs (via Radix Dialog) and wires them into the header actions (reset/import), alongside adding dialog open/close animations.
Changes:
- Added a reusable
Dialogcomponent backed by@radix-ui/react-dialog. - Updated header button tray to use custom dialogs for reset/import/error flows and moved import validation/confirmation into the UI.
- Added global CSS animations for dialog overlay/content transitions.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.css | Adds open/close animations for dialog overlay/content. |
| src/core/workspace/utils/io/useInputOutput.ts | Changes importPlan to accept parsed/validated SaveFile data instead of reading a File directly. |
| src/core/workspace/provider.tsx | Removes native confirmation prompt from resetWorkspace (now handled in UI). |
| src/components/header/HeaderButton.tsx | Extracts icon button + tooltip into a reusable header button component. |
| src/components/header/ButtonTray.tsx | Integrates custom dialogs for reset/import/error and performs file parsing + schema validation before import. |
| src/components/dialog.tsx | Introduces the Radix-based dialog implementation (portal, overlay, content, keyboard handling). |
| package.json | Adds @radix-ui/react-dialog dependency. |
| package-lock.json | Lockfile updates for the new dependency and related resolution changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ramonechen
approved these changes
Apr 9, 2026
ramonechen
left a comment
Contributor
There was a problem hiding this comment.
The new custom dialogs look great in my opinion. I think this is fit to be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds custom stylized dialogs to the site. Previously we used the system default. I just changed it so we are now using stylized ones.