ondras / wwwsqldesigner

WWW SQL Designer, your online SQL diagramming tool
https://sql.toad.cz/?keyword=online_library
BSD 3-Clause "New" or "Revised" License
2.87k stars 725 forks source link

Load/Save redesign: local storage won't ask to enter new name #205

Open tempelmann opened 9 years ago

tempelmann commented 9 years ago

See this img as I see it in Safari / OS X:

screen shot 2015-06-16 at 13 28 31

This is how it looks initially. As you can see, no name is selected. It would be nice to re-select the last choice.

However, the more critical issue is that there is no way to save to or load from a new name as there is no prompt coming for that. When using the Save or Load button, it simply won't do anything if nothing is selected.

One way to solve this is to add a new item to the popup list, naming it "[New name]", and setting that as the list default (so that there is always something chosen). Still, once a name has been chosen, the next time we open this dialog, it should revert to that last choice.

tempelmann commented 9 years ago

Also, I wonder if Quicksave works, too, i.e. will it save to the browser storage when that's chosen last? It certainly should the way the UI looks, but there is no feedback to tell. (Plus, F2 won't work on everyone's computer, e.g. I've overloaded my F-keys with global shortcuts, but that's not something to worry about here - just keep in mind that you may not always have full access to F-keys on a Mac)

ondras commented 9 years ago

As far as F2 goes, it works on my machine. (No UI feedback though, which is not nice.)

ondras commented 9 years ago

I added the default option so the selectbox shall be never empty.

Persisting the last saved name is tricky - shall this value be shared across different storage backends, or shall it be specific to the Browser storage?

tempelmann commented 9 years ago

Well, I wondered the same. That's why I used a separate variable to save the "last saved name" for dropbox and local storage. I don't think it's a problem if using the same name across all storage types, as long as you also remember + restore the last used chosen storage type (because, currently, it always falls back to the server storage mode).

ondras commented 9 years ago

Right, the server storage is the default because of the "?keyword=xxx" feature that allows you to permalink to a (server-)saved design.