-
Notifications
You must be signed in to change notification settings - Fork 4
Add custom message dialog #264
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
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.
Pull request overview
This PR introduces a custom MessageDialog class to provide a consistent, branded alternative to Qt's standard QMessageBox for displaying errors, warnings, and informational messages. The dialog supports expandable detail sections for technical information like stack traces, custom icons with tooltips, and rich text formatting.
Changes:
- Added new
MessageDialogclass with support for three message types (ERROR, WARNING, INFO) - Implemented Qt-style class methods (
error(),warning(),information()) for convenient usage - Added comprehensive documentation in DEVELOPMENT.md explaining usage, migration from QMessageBox, and best practices
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/jabs/ui/message_dialog.py | New custom message dialog implementation with collapsible details, icon support, and Qt-style API |
| src/jabs/ui/init.py | Code reformatting only - no functional changes |
| docs/DEVELOPMENT.md | Documentation for MessageDialog usage, migration guide, and best practices |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fallback_map = { | ||
| MessageType.ERROR: "❌", | ||
| MessageType.WARNING: "⚠️", | ||
| MessageType.INFO: "ℹ️", # noqa: RUF001 |
Copilot
AI
Jan 10, 2026
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.
The comment # noqa: RUF001 suppresses a linter warning but doesn't explain why this specific Unicode character is intentionally used. Consider adding an explanation like # noqa: RUF001 - Unicode info symbol for consistent cross-platform display.
| MessageType.INFO: "ℹ️", # noqa: RUF001 | |
| MessageType.INFO: "ℹ️", # noqa: RUF001 - Unicode info symbol for consistent cross-platform display |
|
|
||
| from PySide6.QtWidgets import QApplication | ||
|
|
||
| class TestWindow(QWidget): |
Copilot
AI
Jan 10, 2026
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.
The test window implementation in main() provides manual testing but lacks automated test coverage for the MessageDialog class. Consider adding unit tests to verify dialog creation, details toggling, and the behavior of class methods (error/warning/information).
Adds a custom message dialog that can be used for three classes of messages: failure, warning, information
Does not convert any of the existing dialogs yet, those still use QMessageBox. A future PR will convert those if this is merged.