8000 Improvement: Moved New Bulletins to Use 'Simple' Version of Immersive Dialog and not 'Full' Version by IllianiBird · Pull Request #6851 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 6 commits into from
May 19, 2025

Conversation

IllianiBird
Copy link
Collaborator

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.

< 8000 pre class="color-fg-muted ws-pre-wrap">… Dialog and not 'Full' Version
Copy link
codecov bot commented May 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 12.03%. Comparing base (49d3af0) to head (0105e9c).
Report is 115 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/gui/CampaignGUI.java 0.00% 1 Missing ⚠️
MekHQ/src/mekhq/gui/dialog/NewsDialog.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HammerGS HammerGS requested a review from Copilot May 7, 2025 23:50
Copy link
Contributor
@Copilot Copilot AI left a 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());

@IllianiBird IllianiBird marked this pull request as ready for review May 19, 2025 23:16
@IllianiBird IllianiBird requested a review from a team as a code owner May 19, 2025 23:16
@IllianiBird IllianiBird merged commit 665a607 into MegaMek:master May 19, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0