mozilla-lockwise / lockwise-addon

Take your passwords everywhere
https://mozilla-lockwise.github.io/lockwise-addon
Mozilla Public License 2.0
266 stars 28 forks source link

Use shared Redux store code across background, panel, and full-tab UI #59

Open lmorchard opened 5 years ago

lmorchard commented 5 years ago

TL;DR: The basic setup could work something like this:

More background:

The addon is composed of a background script, a panel UI, and a full-tab management UI. Currently, each of these pieces has its own data management code - the background has a datastore.js, and the two UI views have variant Redux stores.

A single Redux store module could be shared between all parts of the add-on. There, we could define one common set of actions and a data store modeled after the Logins API (ala #21). Redux actions map well to messages, which also reduces complexity between background and UI views.

lmorchard commented 5 years ago

This seems like a neat, low-priority idea for enhancement. Filing an issue to solicit poking holes in it. A few to start: