-
Notifications
You must be signed in to change notification settings - Fork 188
Improvement: Moved New Bulletins to Use 'Simple' Version of Immersive Dialog and not 'Full' Version #6851
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6851 +/- ##
============================================
- Coverage 12.03% 12.03% -0.01%
+ Complexity 6889 6886 -3
============================================
Files 1103 1103
Lines 142284 142279 -5
Branches 21991 21991
============================================
- Hits 17121 17118 -3
- Misses 123328 123333 +5
+ Partials 1835 1828 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 refactors the news bulletin dialogs so that they use the simple immersive dialog instead of the full version, aligning them with the updated core component approach.
- Updated NewsDialog to extend ImmersiveDialogSimple and adjusted its constructor signature and documentation.
- Updated CampaignGUI to instantiate NewsDialog with a string message obtained from the NewsItem.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
MekHQ/src/mekhq/gui/dialog/NewsDialog.java | Changed the dialog to use ImmersiveDialogSimple and updated the constructor and documentation accordingly. |
MekHQ/src/mekhq/gui/CampaignGUI.java | Modified instantiation of NewsDialog to pass the message as a string instead of a NewsItem. |
Comments suppressed due to low confidence (2)
MekHQ/src/mekhq/gui/dialog/NewsDialog.java:83
- The removal of createButtons() and the passing of null for the buttons parameter may remove interactive controls such as a close button; confirm if this behavior is intended or if a minimal interactive control should be reintroduced.
null, false);
MekHQ/src/mekhq/gui/CampaignGUI.java:1453
- [nitpick] Ensure that directly using news.getFullDescription() as the dialog message meets the new dialog's display expectations, considering that the previous implementation handled a NewsItem with potential formatting.
new NewsDialog(getCampaign(), news.getFullDescription());
The news bulletins weren't taking advantage of the components added by the core Immersive Dialog, so they might as well use the simple version.