Skip to content

feat(components): add reusable ModalDialog component - #242

Open
markcrivera wants to merge 3 commits into
mainfrom
refactor/modal-dialog
Open

feat(components): add reusable ModalDialog component#242
markcrivera wants to merge 3 commits into
mainfrom
refactor/modal-dialog

Conversation

@markcrivera

Copy link
Copy Markdown
Collaborator

Summary

Adds a reusable ModalDialog component so confirmation and text input flows stop relying on native window.prompt and window.confirm dialogs. This also gives the app a single dialog to consolidate the hand-rolled Headless UI dialogs in components like CompanyBoundaries, UserAdmin, and Export over time.

Changes

  • components/ModalDialog.vue, a Headless UI Dialog wrapper with:
    • title, optional message, and a default slot for custom content
    • confirm and cancel events with configurable button labels
    • optional text input (showInput, initialValue, placeholder) that focuses on open and confirms on enter
    • warning variant with a warning icon and red confirm button for destructive actions
    • busy state that disables the confirm button and shows busyText while an async action runs
    • light and dark theme styles consistent with existing components

No existing components are converted in this PR.

Testing

  • Verified the input prefilled initial value, focus on open, enter and button both confirm, cancel leaves data untouched.
  • Verified the warning: busy label shows while the request runs and the confirm button is disabled until it settles.
  • Verified light and dark themes.

Related

Signed-off-by: Mark Rivera <mcrivera@gmail.com>
@Amndeep7
Amndeep7 temporarily deployed to tir-refactor-modal-dial-lg4zly August 11, 2026 14:26 Inactive
Signed-off-by: Mark Rivera <mcrivera@gmail.com>
@Amndeep7
Amndeep7 temporarily deployed to tir-refactor-modal-dial-lg4zly August 11, 2026 15:22 Inactive
Comment thread components/ModalDialog.vue Outdated
Signed-off-by: Mark Rivera <mcrivera@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@kevjablonski kevjablonski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, approved!

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.

3 participants