1j01 / jspaint

🎨 Classic MS Paint, REVIVED + ✨Extras
https://jspaint.app/about
MIT License
7.22k stars 562 forks source link

Firefox Web App - canvas from storage opens in ugly separate window with upper URL bar #174

Open TheLastGimbus opened 4 years ago

TheLastGimbus commented 4 years ago

On Firefox Web App on Android, when you open edited stuff from "Manage Storage", it redirects you to this ulgy some kind of temporary opened side with huuuge upper URL bar, instead of nice fullscreen PWA.

Manage Storage pop up

Ugly top bar

1j01 commented 4 years ago

Yes, I agree this should change.

This will probably be part of a larger effort to change how storage works, maybe terming it Recovery. (Calling it Manage Storage, and automatically loading images from URLs without a message, implies to users that it's a safe place to store things, but it's not, and even that they can share these URLs, but they cannot. So I think calling it Recover Documents and refocusing it on that would be better.)

I made the "Open" links open in a new tab for a couple reasons, and this ugly separate browser view is what that results in on mobile when installed as a PWA. The reasons are:

  1. On desktop you can open multiple links to see them quickly, but this could be done with middle click or Ctrl+click as long as they're links, and could be supplanted by better viewing features like a click-to-zoom or even a more gallery like experience, because it's really the viewing that's important, to see if you want to delete a given image. (It's not so important to support opening a bunch of images at once for editing; I you end up wanting to do that, you should probably have saved them to files.)
  2. If navigating to a new document, as it works now if you type in a new document ID in the URL, it asks you if you want to "Save changes to untitled?" or Discard or Cancel, but it actually switches to the new session right away, without changing the canvas content. You might overwrite the document you're trying to navigate to. So this needs some work.
    • (It'd be better if it asked you if you wanted to save before switching URLs, except that it should handle the case of you changing the URL manually anyways... which I guess could work where it changes the URL immediately back and then only changes it again to what you entered when you choose Discard or Save, but it should probably have some more distance between the URL and what's considered the active session, and change back if you hit Cancel, or the close button.. but that has it's own problems... or maybe it should have both document IDs in the URL if it's waiting to open a different document. That would work similarly to the option where it changes the URL immediately back when you enter a new document ID in the URL, but with the benefit that the URL is more descriptive. But I'm not sure it's worth being more descriptive to have that extra state, and need to change back if you hit Cancel or close, vs doing nothing, which is the usual course of action for something that says Cancel.)
    • This would all be easier if history was saved with the session. I wouldn't have to worry about switching sessions so much if you could switch and switch back and have all your undo/redo history in tact. I would probably not even have a confirmation dialog, just an undo/back button, and your browser's back button would work as well.
      • I'm working on a new editor, Mopaint, that has history saved with the session, and with the document, and it's wonderful. I want to eventually base jspaint off of mopaint, and have it be basically a skin for mopaint. But this is very long term.

Sorry for the wall of text, but this is my extensive thoughts on this.

Workaround: save file, open file.