8000 Improvement: Added In-Game Tutorial Documentation to the Briefing Room for AtB and StratCon Contracts by IllianiBird · Pull Request #6862 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Added In-Game Tutorial Documentation to the Briefing Room for AtB and StratCon Contracts #6862

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 4 commits into from
May 6, 2025

Conversation

IllianiBird
Copy link
Collaborator
image

Includes information about Scenarios, CVP, and Combat Roles.

@HammerGS @Scoppio as requested.

@IllianiBird IllianiBird added GUI UX User experience labels May 3, 2025
@IllianiBird IllianiBird self-assigned this May 3, 2025
Copy link
codecov bot commented May 3, 2025

Codecov Report

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

Project coverage is 11.57%. Comparing base (621fe04) to head (c96a975).
Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/gui/view/MissionViewPanel.java 0.00% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6862   +/-   ##
=========================================
  Coverage     11.56%   11.57%           
- Complexity     6607     6610    +3     
=========================================
  Files          1100     1100           
  Lines        140990   141068   +78     
  Branches      21839    21846    +7     
=========================================
+ Hits          16308    16328   +20     
- Misses       122985   123039   +54     
- Partials       1697     1701    +4     

☔ 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 6, 2025 02:47
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 introduces in-game tutorial documentation for AtB and StratCon contracts by adding a new tutorial panel and refactoring the mission stats layout.

  • Adds a new right-panel tutorial display using a JEditorPane with inline CSS styling.
  • Moves most stat label additions from pnlStats to a newly created leftPanel for better layout management.
  • Introduces minor refactoring by reassigning pnlStats and rearranging layout components.
Files not reviewed (1)
  • MekHQ/resources/mekhq/resources/ContractViewPanel.properties: Language not supported
Comments suppressed due to low confidence (1)

MekHQ/src/mekhq/gui/view/MissionViewPanel.java:1118

  • [nitpick] The mix of 'pnlStats' and 'leftPanel' for displaying mission stats may cause confusion; consider aligning their naming or consolidating them for clarity.
pnlStats = new JPanel(new FlowLayout(FlowLayout.LEFT));

AtBContract contract = (AtBContract) mission;
Campaign campaign = gui.getCampaign();

// TODO : Switch me to use IUnitRating
String[] ratingNames = {"F", "D", "C", "B", "A"};
pnlTutorialText = new JPanel();
Copy link
Preview
Copilot AI May 6, 2025

Choose a reason for hiding this comment

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

The panel 'pnlTutorialText' is declared but not used in the layout; consider removing it or integrating it into the UI if it is intended to display tutorial information.

Suggested change
pnlTutorialText = new JPanel();
pnlTutorialText = new JPanel();
pnlTutorialText.setBorder(BorderFactory.createTitledBorder("Tutorial Information"));
GridBagConstraints gbcTutorialText = new GridBagConstraints();
gbcTutorialText.gridx = 0;
gbcTutorialText.gridy = 0;
gbcTutorialText.gridwidth = 2;
gbcTutorialText.insets = new Insets(5, 5, 5, 5);
gbcTutorialText.fill = GridBagConstraints.BOTH;
gbcTutorialText.weightx = 1.0;
gbcTutorialText.weighty = 0.2;
leftPanel.add(pnlTutorialText, gbcTutorialText);

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This matches the current layout of the code. It's not great, but changing that would require significant rewrites and is outside the scope of this PR.

@IllianiBird
Copy link
Collaborator Author

Recent changes to master have broken this. Working on a fix.

< 8000 a class="d-inline-block" data-hovercard-type="user" data-hovercard-url="/users/IllianiBird/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/IllianiBird">@IllianiBird
Copy link
Collaborator Author

Fixed

image

@Scoppio Scoppio merged commit 8a2cc54 into MegaMek:master May 6, 2025
6 checks passed
@IllianiBird IllianiBird deleted the briefingRoomTutorialization branch June 7, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0