Skip to content
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

Colorise Skill Levels #5053

Merged
merged 23 commits into from
Oct 17, 2024
Merged

Colorise Skill Levels #5053

merged 23 commits into from
Oct 17, 2024

Conversation

WeaverThree
Copy link
Collaborator

This started because I wanted a way to easily distinguish skill levels in Tech List of the Repair Panel:

2024-10-16_082027

This followed on to the repair section of the Warehouse:

2024-10-16_093000

And the refit selector:

2024-10-16_082135

And then on to non-techs, we have the Doctor List, which probably needs to be sorted by skill as well but who has that many doctors?

2024-10-15_202517

And then it was on to the rest of the places skill shows up in the program:

2024-10-15_202308

2024-10-15_203651

2024-10-15_201542

Of course, in the Personnel List, things can become a bit overboard with row highlights:

2024-10-15_201423

But in a week of playing with it, I didn't have a list nearly that bad and I don't think it works out too bad even if you do.

Of course, the colors are customizable. I believe these are reasonable defaults, though:

2024-10-15_205025

Along the way, I also cleaned up a fair bit of code to use StringBuilders, better HTML, better case statements, and ReportingUtilities.messageSurroundedBySpanWithColor() and such.

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.44%. Comparing base (4a9cce8) to head (b9491ac).
Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master    #5053    +/-   ##
==========================================
  Coverage     10.43%   10.44%            
- Complexity     6032     6038     +6     
==========================================
  Files           952      952            
  Lines        133878   133986   +108     
  Branches      19436    19432     -4     
==========================================
+ Hits          13976    13989    +13     
- Misses       118560   118655    +95     
  Partials       1342     1342            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IllianiCBT
Copy link
Collaborator

So one point of feedback, before I review this properly: as a rule we use green to denote 'good' and red to denote 'bad'. While I see why you chose this scale, I think flipping the colors would be better. Purple for Elite is 10/10 though, let's keep that.

Copy link
Collaborator

@IllianiCBT IllianiCBT left a comment

Choose a reason for hiding this comment

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

A couple of questions, but nothing that'll stop this from being merged. :)

@WeaverThree
Copy link
Collaborator Author

WeaverThree commented Oct 16, 2024

For the colors, does this look good? @IllianiCBT

2024-10-16_114211

@IllianiCBT
Copy link
Collaborator

Perfect! :)

@HammerGS HammerGS merged commit b136248 into MegaMek:master Oct 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants