8000 Improvement: Improved Display of Civilian Professions by IllianiBird · Pull Request #6923 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Improved Display of Civilian Professions #6923

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 3 commits into from
May 10, 2025

Conversation

IllianiBird
Copy link
Collaborator

Civilian professions will now display in italics and we properly differentiate between Children, Students, and normal Dependents. The goal here is to make civilian roles visually stand out from normal roles, so players cannot mistake which is which.

This is designed to work with #6920, but there's no reason for it to wait until that PR merges.

@IllianiBird IllianiBird self-assigned this May 8, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner May 8, 2025 20:57
@IllianiBird IllianiBird added GUI UX User experience labels May 8, 2025
Copy link
codecov bot commented May 8, 2025

Codecov Report

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

Project coverage is 12.04%. Comparing base (4158360) to head (ba57463).
Report is 56 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/personnel/Person.java 0.00% 23 Missing ⚠️
...src/mekhq/gui/enums/PersonnelTableModelColumn.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6923      +/-   ##
============================================
- Coverage     12.04%   12.04%   -0.01%     
+ Complexity     6851     6850       -1     
============================================
  Files          1101     1101              
  Lines        141386   141394       +8     
  Branches      21897    21907      +10     
============================================
- Hits          17028    17025       -3     
- Misses       122537   122545       +8     
- Partials       1821     1824       +3     

☔ 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 10, 2025 15:25
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 improves how civilian professions are displayed in the UI by styling them in italics and clearly distinguishing between Children, Students, and normal Dependents. Key changes include:

  • Updating PersonnelTableModelColumn to call a new formatting method for role descriptions.
  • Adding a new method in Person.java to generate HTML-formatted role descriptions with appropriate styling.
  • Replacing multiple explicit enum imports with a wildcard import in Person.java.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
MekHQ/src/mekhq/gui/enums/PersonnelTableModelColumn.java Updated the role description method call to use the new formatting method.
MekHQ/src/mekhq/campaign/personnel/Person.java Added the new HTML-formatted role description method and updated enum imports.
Comments suppressed due to low confidence (2)

MekHQ/src/mekhq/campaign/personnel/Person.java:1012

  • [nitpick] The method name 'getFormatedRoleDescriptions' appears to be misspelled; consider renaming it to 'getFormattedRoleDescriptions' for improved clarity.
public String getFormatedRoleDescriptions(LocalDate today) {

MekHQ/src/mekhq/campaign/personnel/Person.java:97

  • [nitpick] Using a wildcard import may decrease code clarity and could inadvertently import unwanted classes; consider using explicit imports to better manage dependencies in accordance with project style guidelines.
import mekhq.campaign.personnel.enums.*;

@HammerGS HammerGS merged commit e48a36d into MegaMek:master May 10, 2025
6 checks passed
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