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

Added Era Buttons to Date Chooser and Modernized GUI #4945

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Refactored the DateChooser class to support internationalization using ResourceBundle for dynamic text handling. Introduced new era selection buttons for different eras in the UI.

image

Closes #4662

Refactored the DateChooser class to support internationalization using ResourceBundle for dynamic text handling. Introduced new era selection buttons for different eras in the UI.
@IllianiCBT IllianiCBT added GUI UX User experience labels Sep 29, 2024
@IllianiCBT IllianiCBT self-assigned this Sep 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.44%. Comparing base (90ea1b7) to head (3d8ac8f).
Report is 66 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master    #4945    +/-   ##
==========================================
  Coverage     10.44%   10.44%            
- Complexity     5998     6007     +9     
==========================================
  Files           951      951            
  Lines        132874   132976   +102     
  Branches      19329    19330     +1     
==========================================
+ Hits          13873    13886    +13     
- Misses       117653   117738    +85     
- Partials       1348     1352     +4     

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

Eliminated the obsolete era-related constants from DateChooser to clean up the codebase. Updated the button action listener to use the setDate method and dispose of the dialog afterward.
Renamed methods and variables for better readability. Added a "Confirm Date" button to the DateChooser dialog and restructured dialogue layout for improved user interaction.
Ensured the DateChooser dialog only closes if the date is valid by modifying `updateDateFromDateField` to return a boolean. Removed unnecessary logic in focusLost and keyReleased methods to simplify code and prevent erroneous updates.
Ensured the DateChooser dialog only closes if the date is valid by modifying `updateDateFromDateField` to return a boolean. Removed unnecessary logic in focusLost and keyReleased methods to simplify code and prevent erroneous updates.
Copy link
Member

@HammerGS HammerGS left a comment

Choose a reason for hiding this comment

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

Tested and seems to work.

@HammerGS HammerGS merged commit 83c099c into MegaMek:master Oct 2, 2024
4 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.

RFE: Include era-bookmarks with the calendar when starting a new campaign.
3 participants