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 Dialog to Confirm New Campaign (redux) #3915

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

IllianiCBT
Copy link
Collaborator

This is a redux of #3909 which was closed due to an unusually high volume of dirty edits.

Current Implementation

Currently the option to start a new campaign is available through 'toolbar/files/new campaign' and is listed immediately beneath Save Campaign and Load Campaign.

Problem

I am aware of a long standing bug where clicking 'new campaign' and then cancelling out can have adverse effects on a campaigns' 'campaign settings'. The proximity of the option near 'save' and 'load' increases the chances of a user accidentally interacting with 'new campaign'. In these events, the user will naturally cancel out of the option and (unless they're on Discord a lot) they will likely be unaware of the damage this potentially caused.

Solution

This has been a problem for years at this point, while the issue being fully resolved is the more desirable outcome, this patch is designed to reduce the chance of users accidentally clicking 'new campaign' when attempting to save or load.

Update

Since the initial introduction of this PR I have significantly changed its implementation.

When selecting 'New Campaign' users will be presented with a dialog asking them to confirm that they wish to start a new campaign. Selecting 'no' or closing the dialog does nothing. Selecting 'yes' initiates the new campaign process (this process is identical to current implementation).

image

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

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

Project coverage is 10.65%. Comparing base (0a2b4e4) to head (b3e4bf0).
Report is 75 commits behind head on master.

Files Patch % Lines
MekHQ/src/mekhq/gui/CampaignGUI.java 0.00% 5 Missing ⚠️
...ekhq/gui/dialog/NewCampaignConfirmationDialog.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3915      +/-   ##
============================================
+ Coverage     10.60%   10.65%   +0.04%     
- Complexity     5487     5536      +49     
============================================
  Files           836      840       +4     
  Lines        114266   114376     +110     
  Branches      17182    17202      +20     
============================================
+ Hits          12121    12189      +68     
- Misses       100935   100957      +22     
- Partials       1210     1230      +20     

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

@IllianiCBT IllianiCBT changed the title [Bandaid] Added Dialog to Confirm New Campaign (redux) Added Dialog to Confirm New Campaign (redux) Mar 29, 2024
@IllianiCBT IllianiCBT self-assigned this Mar 29, 2024
@IllianiCBT IllianiCBT added GUI UX User experience labels Mar 29, 2024
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@HammerGS HammerGS merged commit 7f1c300 into MegaMek:master Apr 6, 2024
5 of 6 checks passed
HammerGS added a commit that referenced this pull request Apr 6, 2024
+ PR #3922: Add missing cockpit costs and weights
+ PR #3944: Added Nag Dialog for Pregnant Combatants
+ Fix #3943: Unmaintained Unit Nag Dialog Suppressed for Units set to
Salvage
+ PR #3933: Fixes for #3729,#3817,#3753: Clamped Unit Rating Mod for
CamOps (redux)
+ PR #3923: Hide Toughness When 0
+ PR #3915: Added Dialog to Confirm New Campaign (redux)
+ PR #3908: Adjusted Default Tech Counts
+ PR #3967: Adjusted Zoom Speed on Interstellar Map Panel
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.

4 participants