8000 Improvement: Improved Person View to Include Attribute Modifiers by IllianiBird · Pull Request #6841 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Improved Person View to Include Attribute Modifiers #6841

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

Closed
wants to merge 5 commits into from

Conversation

IllianiBird
Copy link
Collaborator
@IllianiBird IllianiBird commented May 2, 2025

Requires #6839

Requires #6837

Fix #4451
Fix #6326

Dev Notes

The goal of this change was to break up the visual 'blocking' of the display so that users could more easily pick out the information they needed, while also providing better support for attribute modifiers and role-play skills.

The little green 'medical' symbol previously linked the user to the characters' medical history. That has been removed, instead the medical report can be accessed from the characters' right-click menu.

Before

image

After

image

(The genealogy is further down in the view)

image image

…aded Several Components; Moved Medical Record Button to Personnel Right-Click Menu
Copy link
codecov bot commented May 2, 2025

Codecov Report

Attention: Patch coverage is 4.21793% with 545 lines in your changes missing coverage. Please review.

Project coverage is 11.58%. Comparing base (b36a274) to head (331d82d).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/gui/view/PersonViewPanel.java 0.00% 427 Missing ⚠️
...kHQ/src/mekhq/campaign/personnel/skills/Skill.java 29.48% 53 Missing and 2 partials ⚠️
...src/mekhq/campaign/personnel/skills/SkillType.java 4.00% 24 Missing ⚠️
.../mekhq/gui/adapter/PersonnelTableMouseAdapter.java 0.00% 23 Missing ⚠️
MekHQ/src/mekhq/campaign/personnel/Person.java 0.00% 11 Missing ⚠️
MekHQ/src/mekhq/gui/PersonnelTab.java 0.00% 3 Missing ⚠️
...rc/mekhq/campaign/personnel/skills/Attributes.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6841      +/-   ##
============================================
+ Coverage     11.57%   11.58%   +0.01%     
- Complexity     6610     6616       +6     
============================================
  Files          1100     1100              
  Lines        141025   141113      +88     
  Branches      21839    21887      +48     
============================================
+ Hits          16320    16345      +25     
- Misses       123003   123067      +64     
+ Partials       1702     1701       -1     

☔ 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 2, 2025 03:28
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 personnel view by enlarging the portrait display area, updates various component behaviors for clearer interactions, and moves the medical report access into the personnel right-click menu. Key changes include:

  • Introducing a new CMD_MEDICAL_RECORDS action that opens a medical report dialog from the right-click menu.
  • Adjusting UI scaling in PersonnelTab for a more dynamic layout.
  • Adding helper methods and documentation updates in SkillType, Attributes, and Person to support the revised functionality.

Reviewed Changes

Copilot reviewed 7 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java New CMD_MEDICAL_RECORDS action and dialog initialization for medical reports.
MekHQ/src/mekhq/gui/PersonnelTab.java Updates to UI scaling and layout dimensions for the personnel view.
MekHQ/src/mekhq/campaign/personnel/skills/SkillType.java Additional utility methods and documentation enhancements for skill filtering and flavor text.
MekHQ/src/mekhq/campaign/personnel/skills/Attributes.java Added a helper method to calculate attribute modifiers.
MekHQ/src/mekhq/campaign/personnel/Person.java New methods for counting and filtering skills, plus minor refactoring of reputation calculation.
Files not reviewed (4)
  • MekHQ/resources/mekhq/resources/GUI.properties: Language not supported
  • MekHQ/resources/mekhq/resources/PersonViewPanel.properties: Language not supported
  • MekHQ/resources/mekhq/resources/Skill.properties: Language not supported
  • MekHQ/resources/mekhq/resources/SkillType.properties: Language not supported
Comments suppressed due to low confidence (1)

MekHQ/src/mekhq/gui/PersonnelTab.java:228

  • Verify that using round to compute the minimum width is consistent with other GUI scaling practices in the project to avoid any unintended layout discrepancies.
scrollPersonnelView.setMinimumSize(new Dimension((int) round(PERSONNEL_VIEW_WIDTH * 0.9), 600));

< 8000 tr>
@@ -356,6 +359,12 @@ public void actionPerformed(ActionEvent action) {
}
break;
}
case CMD_MEDICAL_RECORDS: {
MedicalViewDialog medDialog = new MedicalViewDialog(null, getCampaign(), selectedPerson);
Copy link
Preview
Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

Consider passing a valid parent component to MedicalViewDialog instead of null to ensure proper dialog modality and window stacking across platforms.

Suggested change
MedicalViewDialog medDialog = new MedicalViewDialog(null, getCampaign(), selectedPerson);
MedicalViewDialog medDialog = new MedicalViewDialog(getParentComponent(), getCampaign(), selectedPerson);

Copilot uses AI. Check for mistakes.

@IllianiBird IllianiBird closed this May 7, 2025
@IllianiBird IllianiBird changed the title Improvement: Improved Person View to Include a Larger Portrait & Upgraded Several Components; Moved Medical Record Button to Personnel Right-Click Menu Improvement: Improved Person View to Include Attribute Modifiers May 7, 2025
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.

[RFE] Option for larger size portraits on personnel and toe tabs. RFE: Larger/Adjustable Portrait Display Size
1 participant
0