aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-26 01:33:01 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-26 01:33:01 +0800
commitb2233f7e0a6d2596b3fdffe0f0f76bfa58f541f9 (patch)
tree4d2ced619ad84dc8a431ecc9afca4ffbdfc1eecf /docs
parent2faf3f70631be2ef12cb004f5e890ec453df8169 (diff)
downloadtangerine-wallet-browser-b2233f7e0a6d2596b3fdffe0f0f76bfa58f541f9.tar.gz
tangerine-wallet-browser-b2233f7e0a6d2596b3fdffe0f0f76bfa58f541f9.tar.zst
tangerine-wallet-browser-b2233f7e0a6d2596b3fdffe0f0f76bfa58f541f9.zip
Noted initial thoughts
Diffstat (limited to 'docs')
-rw-r--r--docs/form_persisting_architecture.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/form_persisting_architecture.md b/docs/form_persisting_architecture.md
new file mode 100644
index 000000000..8b5ab495f
--- /dev/null
+++ b/docs/form_persisting_architecture.md
@@ -0,0 +1,14 @@
+# Form Persisting Architecture
+
+Since:
+ - The popup is torn down completely on every click outside of it.
+ - We have forms with multiple fields (like passwords & seed phrases) that might encourage a user to leave our panel to refer to a password manager.
+
+ We cause user friction when we lose the contents of certain forms.
+
+ This calls for an architecture of a form component that can completely persist its values to LocalStorage on every relevant change, and restore those values on reopening.
+
+Whenever this class is loaded, it registers an `onChange` listener. On those events, it checks the target for a special ID attribute it listens for.
+
+Let's say we call our class `PersistentForm`. So then we might check for a `persistent-form-id`.
+