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

Start new article by postponing the actual naming and saving #161

Open
csarven opened this issue Oct 12, 2016 · 3 comments
Open

Start new article by postponing the actual naming and saving #161

csarven opened this issue Oct 12, 2016 · 3 comments

Comments

@csarven
Copy link
Member

csarven commented Oct 12, 2016

Raised by @BigBlueHat

Currently when "New" is triggered user is asked to enter a location where the new article will be stored. Can we postpone the naming until user commits to saving? One option:

as in only keep it in localStorage/offline some place and (re)name it later
(using a UUID or something for the article in the interim)

@BigBlueHat
Copy link

I'd actually recommend using http://pouchdb.com/ over something "raw" like localStorage. PouchDB doesn't care if it stores JSON-LD or "just" JSON, and it also keeps attachements (images, etc), so you're all prepped and ready for storing All The Things.

When you're ready to persist them on the Web someplace, PUT it there +/- removing (or syncing) the offline copy. That's the idea anyhow. 😄

🎩

@csarven
Copy link
Member Author

csarven commented Oct 12, 2016

Wouldn't localStorage suffice? Right now I can't think of doing anything more than RW an 'html' key with the result of DO.U.getDocument() - a normalised HTML string.. same as what comes out in "Export"/"Save"/"Save As". Smallest footprint.

The URI bit interests me quite a bit. Would the idea be to change the window history state to the "temp" / while in "new". Would an URN or a data URI will do? Right now there is /new (which is a skeleton HTML more or less) but that's not really reliable since it is not likely to be there for anything beyond what comes with dokieli on the root directory (and if publicly available).

Beyond this issue is getting #110 working so that 'new' is actually usable.

@BigBlueHat
Copy link

I'd vote for something like urn:uuid: https://tools.ietf.org/html/rfc4122 and depending on how things are setup in the code you could do something like /new#uri=urn:uuid:{uuid} to load it out of localStorage. Once it's stored some place else, you could keep that URL in localStorage (perhaps), so that any later attempt to revisit the localStorage copy (the urn:uuid: one) could/would redirect/load the "permanent" one.

Maybe. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants