Dialog abstraction using DialogWrapper#830
Merged
Merged
Conversation
|
@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a reusable dialog abstraction system to reduce code duplication across dialog components by creating a standardized approach for common dialog patterns.
- Added
DialogWrappercomponent that handles common dialog elements like headers, footers, and buttons - Added
useDialoghook with strongly typed configurations for different dialog types - Converted existing dialogs to use the new abstraction system
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| useDialog.ts | Hook providing typed dialog state management with configurations for different dialog types |
| DialogWrapper.tsx | Wrapper component handling common dialog patterns with automatic button generation |
| ShutdownDialog.tsx | Converted to use DialogWrapper with custom type for specialized content |
| RemoveNodeDialog.tsx | Converted to use DialogWrapper with confirm type for node removal |
| DeleteMessagesDialog.tsx | Converted to use DialogWrapper with confirm type for message deletion |
Comments suppressed due to low confidence (1)
packages/web/src/components/Dialog/ShutdownDialog.tsx:1
- Double arrow function syntax creates a function that returns another function instead of executing
onOpenChange(false). The correct syntax should beconnection?.shutdown(2).then(() => onOpenChange(false)).
import { Button } from "@components/UI/Button.tsx";
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
philon-
reviewed
Sep 8, 2025
Collaborator
Author
|
@philon- Thanks the merge conflict has been resolved now. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
philon-
approved these changes
Sep 10, 2025
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.
Description
See @philon- it finally got done! 😄
Changes Made
useDialog.ts- Hook for dialog state management with typed configurationsDialogWrapper- Wrapper component for common dialog patternsTesting Done
Screenshots (if applicable)
Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)