USEPA / EPA_Non-geo_Metadata_Editor

3 stars 0 forks source link

Save File - UI saving mechanism #47

Closed jzichichi closed 5 years ago

jzichichi commented 6 years ago

UI should allow user to enter filename. @torrin47 - do you have a preference for how the save operation should work?

Are we always saving back to user's disk or is there an internal mini-repository of metadata where files are uploaded from disk or created and application operates as follows:

upload ->file loaded to repo save -> saves inside repo while user is working download -> takes file from repo to disk

This could also be considered within the phase 1/phase 2 approach as well if we want to use the simpler mechanism in the shorter term.

torrin47 commented 6 years ago

I'm most comfortable with always saving to a users local disk. I know of a pretty nifty metadata editing tool that relies on the browser's localstorage for working with versions and saved copies of metadata (https://go.mdeditor.org/#/dashboard) that is impressive, but I'm still a little more comfortable with standalone json files.

aergul commented 6 years ago

The UI is now functional to view/save metadata document locally. There is a modal to view the metadata document. User may choose to also save from this modal. If a user has previously provided a name for the file, that name will be used when saving. If a name is not yet provided, then the same modal is used to prompt user for a file name. Upon saving (which is simply a download from the browser) a notification is given.

torrin47 commented 6 years ago

Very slick. Big thumbs up.

jzichichi commented 6 years ago

@aergul - looks like it works great. Since @torrin47 has already reviewed/commented on this, I will move it over to the done column.