-
Notifications
You must be signed in to change notification settings - Fork 188
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
Conversation
…aded Several Components; Moved Medical Record Button to Personnel Right-Click Menu
Codecov ReportAttention: Patch coverage is
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. 🚀 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 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));
@@ -356,6 +359,12 @@ public void actionPerformed(ActionEvent action) { | |||
} | |||
break; | |||
} | |||
case CMD_MEDICAL_RECORDS: { | MedicalViewDialog medDialog = new MedicalViewDialog(null, getCampaign(), selectedPerson); |
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.
Consider passing a valid parent component to MedicalViewDialog instead of null to ensure proper dialog modality and window stacking across platforms.
MedicalViewDialog medDialog = new MedicalViewDialog(null, getCampaign(), selectedPerson); | |
MedicalViewDialog medDialog = new MedicalViewDialog(getParentComponent(), getCampaign(), selectedPerson); |
Copilot uses AI. Check for mistakes.
# Conflicts: # MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java
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
After
(The genealogy is further down in the view)