Fantasy-Map-Generator icon indicating copy to clipboard operation
Fantasy-Map-Generator copied to clipboard

Improve Save functionality

Open zethon opened this issue 5 months ago • 9 comments

Problem I have my .map file stored in source control, and every time I save the file to my local drive, I have to rename it (to remove the timestamp), and then drag it over to the repo folder and then I can check it in.

Solution

Give users a way to simply save the file with a filename. Appending the timestamp to the filename is unusual. I understand the purpose of it, and I can see how some people might want that, but there's probably a set of user (me at least) who would prefer the filename not change every time I save it.

You could make it optional, perhaps with an option Append timestamp to filename when saving or something similar. Or you could get fancy and let people specify the filename format when saving it, so that they could even specify the timestamp format if they wanted.

It would also be nice if the desktop version remembered the folder where you saved the file. Though, since it's really just an offline version of the website, I understand if allowing the app to save in folders other than Downloads isn't possible.

Alternatives

As mentioned above, a user can simply rename the file and move it where they want it -- but it's a pain to keep having to do this all the time.

zethon avatar Aug 07 '25 05:08 zethon

It would also be nice if CTRL/COMMAND-S saved, too.

zethon avatar Aug 07 '25 06:08 zethon

The timestamp is an easy way to see the map version. It's recommended to keep old versions as a backup, so timestamp are required. We can add the file naming option if someone would like to work on it.

CTRL+S is already there.

Azgaar avatar Aug 07 '25 10:08 Azgaar

The timestamp is annoying for people who use source control.

zethon avatar Aug 07 '25 18:08 zethon

As I said, I'm not against if you add a hidden option to control it. E.g. console command or even a UI option.

Azgaar avatar Aug 07 '25 23:08 Azgaar

As I said, I'm not against if you add a hidden option to control it. E.g. console command or even a UI option.

Ok.

You mentioned CTRL-S is already there? Where? When I press CTRL-S, it wants to save the webpage, like you would save a page in Chrome. I'd like CTRL-S to save the .map file.

zethon avatar Aug 08 '25 04:08 zethon

It may depend on your browser settings, CTRL + S saves .map file for me.

Azgaar avatar Aug 10 '25 23:08 Azgaar

It does for me too, but it constantly changes the filename: Yanorra 2025-08-22-19-11.map. That timestamp is annoying, and it changes constantly. I see no option to say "hey, don't put the timestamp in the filename".

I'd like an option to just save it as Yanorra.map, overwriting the file if it already exists... just like nearly every other program works.

Instead the app forces the timestamp into the filename. I can see it here: https://github.com/Azgaar/Fantasy-Map-Generator/blob/ab08dc9429e33bfbbd32bd46c07d793fa8aade30/modules/ui/editors.js#L906

zethon avatar Aug 22 '25 23:08 zethon

It should not override the existing file, that's the way to lose your work if case if issues in the current file. But it's a good idea to let user decide on the format.

Azgaar avatar Aug 23 '25 17:08 Azgaar

It should not override the existing file, that's the way to lose your work if case if issues in the current file.

Think about how when you were writing this program, if every time you made a change to main.js your editor saved it to main <current timestamp>.js, it would have driven you nuts. You would have had to be constantly changing the filename to main.js in order to look at, test and commit your changes.

The behavior implemented here is very weird. Though, since the Save functionality is more of a "download", I suppose it'll never work as an application would. Unless the app is hosted in something like Electron.

zethon avatar Aug 24 '25 14:08 zethon