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

Block loading/saving campaign from/to installation dir #4262

Merged
merged 7 commits into from
Aug 30, 2023

Conversation

cwisniew
Copy link
Member

@cwisniew cwisniew commented Aug 25, 2023

Identify the Bug or Feature request

Partially addresses #4209

Description of the Change

This change will stop users from saving campaign files into the installation directory.
If the user tries to do so a dialog will appear telling them that they are unable to do so and after clicking Ok they will be returned to the save dialog where they can choose another location.

As well as this if the user attempts to load a campaign file from the installation directory a dialog will appear informing them its not supported and asking them to copy the file elsewhere and try again. In this case they will not be returned to the load dialog.

Possible Drawbacks

I was not able to address the other requirements like default install to use version number as all attempts I tried just broke the msi builder.

Release Notes

  • MapTool will now block users from saving or loading campaigns from the installation directory.

This change is Reviewable

@cwisniew cwisniew added the feature Adding functionality that adds value label Aug 25, 2023
@kwvanderlinde
Copy link
Collaborator

When I put myself in the shoes of a user that have fallen into this trap, I see two problems on the loading side (saving side seem fine to me):

  1. Not all users may readily know where there installation directory is, and no direction given to them on how to find it.
  2. Even if a user does know where it is, it's a lot of traversal require to remedy the situation. First navigating to the install directory in the file explorer, then navigating somewhere else to put the file, then going back to MapTool and navigating again to the new location via the Load Campaign dialog.

We can help the user out a bit more by:

  1. Changing the message to read something like: "MapTool does not support loading the campaign from the installation directory. Please select a new location for the file."
  2. When they close the message, we immediately open a save dialog and let them pick the new location right there.

@Azhrei
Copy link
Member

Azhrei commented Aug 27, 2023

I do like forcing them to Save As immediately.

However, if they Cancel out of that dialog (or just close it), the File > Save option should be disabled, forcing them to use File > Save As... and picking a new location.

@cwisniew
Copy link
Member Author

Changed it so file is still loaded but user gets this message
CleanShot 2023-08-27 at 22 17 08@2x
This occurs from both load and recent campaigns

Then when trying to save
CleanShot 2023-08-27 at 22 17 23@2x

I decided against opening the save dialog right away as some is going to just click ok on the dialog when its first presented and ben prompted with a save dialog and be confused.

@FullBleed
Copy link

Does this extend to when people try to save other MT assets to the install directory like tokens, tables, campaign props, macro sets, etc?

@cwisniew
Copy link
Member Author

Does this extend to when people try to save other MT assets to the install directory like tokens, tables, campaign props, macro sets, etc?

The updated change blocks Campaign, Tokens, Tables, Props, Macros, Maps from being saved into the install directory. It does not yet stop screenshots (they are handled differently. so I will get to them in a later change, they are also less likely to be a problem.)

@cwisniew cwisniew added this pull request to the merge queue Aug 30, 2023
Merged via the queue into RPTools:develop with commit c527a50 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants