Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Make a backup copy of the new posts in local storage #1057

Open
chevdor opened this issue Oct 29, 2020 · 1 comment
Open

Make a backup copy of the new posts in local storage #1057

chevdor opened this issue Oct 29, 2020 · 1 comment

Comments

@chevdor
Copy link

chevdor commented Oct 29, 2020

Similar to how Github does (for instance): if you start typing a comment, close the page and reopen it, your draft comment is still there.

The goal being to avoid the case where a user spends quite some time writing a long post that ends up vanishing.
I think I even experienced that due to the fact that the Polkadot Extension lost the connection to the node (that happens...), re-established it right away, and as a result, the page reloaded, wiping my draft with no warning.

Not sure how this is done in Github, whether it is done per keypress or once in a while (like every 1s or 5s). Both solutions would be fine, I would be ok losing 5s of work but not more.

@Tbaut
Copy link
Collaborator

Tbaut commented Oct 29, 2020

Storing the content of input upon refresh (just F5 or tab close then reopen last tab) is a standard behaviour provided by browsers. The reason that this does not happen on Polkassembly is because it's an SPA and all the DOM is injected using JS after the page has loaded, the browser will not populate input fields because the input aren't present when the page loads.

Storing content on keystroke or regularly sounds like the only solution, far from ideal though.

Just a comment regarding what you said on the extension, unlike Metamask, the polkadot-js extension is not connected to any node and it doesn't inject anything else than the users' accounts. Polkassembly itself is connected to a node (set as provider to polkadot-js api). This allows any user to actually see proposal outcomes etc in real time without needing an extension.

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

No branches or pull requests

2 participants