8000 Improvement: Added Tooltips to Professions Showing Associated Skills and Their Linked Attributes by IllianiBird · Pull Request #6946 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Added Tooltips to Professions Showing Associated Skills and Their Linked Attributes #6946

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

Conversation

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

Requires #6918

image

@IllianiBird IllianiBird self-assigned this May 9, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner May 9, 2025 22:50
@IllianiBird IllianiBird added GUI UX User experience labels May 9, 2025
@IllianiBird IllianiBird added the Tests Issues or Pull Requests related to the project tests label May 9, 2025
Copy link
codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 31.78808% with 103 lines in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
.../mekhq/campaign/personnel/enums/PersonnelRole.java 38.02% 34 Missing and 10 partials ⚠️
MekHQ/src/mekhq/campaign/personnel/Person.java 32.81% 37 Missing and 6 partials ⚠️
...HQ/src/mekhq/campaign/personnel/PersonUtility.java 0.00% 5 Missing ⚠️
...gn/personnel/generator/AbstractSkillGenerator.java 0.00% 2 Missing ⚠️
...src/mekhq/campaign/personnel/skills/SkillType.java 0.00% 2 Missing ⚠️
...HQ/src/mekhq/campaign/randomEvents/RoninOffer.java 0.00% 2 Missing ⚠️
.../mekhq/gui/adapter/PersonnelTableMouseAdapter.java 0.00% 2 Missing ⚠️
MekHQ/src/mekhq/gui/CampaignGUI.java 0.00% 1 Missing ⚠️
...Q/src/mekhq/gui/adapter/UnitTableMouseAdapter.java 0.00% 1 Missing ⚠️
.../src/mekhq/gui/dialog/HireBulkPersonnelDialog.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6946      +/-   ##
============================================
+ Coverage     11.97%   12.04%   +0.06%     
- Complexity     6789     6851      +62     
============================================
  Files          1101     1101              
  Lines        141489   141386     -103     
  Branches      21915    21897      -18     
============================================
+ Hits          16950    17028      +78     
+ Misses       122741   122537     -204     
- Partials       1798     1821      +23     

☔ 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:24
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 tooltip functionality for professions by adding detailed descriptions of associated skills and attributes, as well as updating corresponding tests and refactoring skill assignment logic. Key changes include updating tooltip generation in the PersonnelRole enum, modifying overrideSkills method signatures to include an artillery flag, and enhancing test coverage using parameterized tests.

Reviewed Changes

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

Show a summary per file
File Description
MekHQ/unittests/mekhq/campaign/personnel/enums/PersonnelRoleTest.java Updated test methods to use parameterized tests and removed obsolete combat/civilian tests.
MekHQ/src/mekhq/gui/dialog/HireBulkPersonnelDialog.java Added an extra boolean parameter for artillery usage in the overrideSkills call.
MekHQ/src/mekhq/gui/adapter/UnitTableMouseAdapter.java Updated the overrideSkills invocation to include the new artillery flag.
MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java Added tooltips to role menu items using a word wrapping utility.
MekHQ/src/mekhq/gui/CampaignGUI.java Integrated the new tooltip functionality in the hire menu items.
MekHQ/src/mekhq/campaign/randomEvents/RoninOffer.java Updated overrideSkills call to include the artillery flag.
MekHQ/src/mekhq/campaign/personnel/skills/SkillType.java Changed the representation for a -1 experience level and added a helper to retrieve attributes.
MekHQ/src/mekhq/campaign/personnel/generator/AbstractSkillGenerator.java Refactored default skills generation to iterate over profession skills instead of using a switch-case.
MekHQ/src/mekhq/campaign/personnel/enums/PersonnelRole.java Added getDescription, getTooltip, and overloaded getSkillsForProfession methods to support enhanced tooltips.
MekHQ/src/mekhq/campaign/personnel/PersonUtility.java Reworked overrideSkills to delegate to the new signature and updated deprecation documentation.

@HammerGS HammerGS merged commit c456e61 into MegaMek:master May 10, 2025
6 checks passed
@IllianiBird IllianiBird deleted the professionTooltips branch June 7, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Tests Issues or Pull Requests related to the project tests UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0