Open
Description
The Wallet Kernel(s) will render bits of UIs in a variety of places and environments:
- The HTTP wallet kernel web pages
- The browser extension wallet kernel UI*
- The Electron desktop app wallet kernel UI*
- Embedded directly (i.e. not hosted anywhere) in browser popup windows by the SDK (atm, only one such example: the discovery/selection popup)
Goals:
- Develop modular UI components as a library, import where needed
- Include CSS styles for consistent UI/UX across all platforms (defined once, styled everywhere)
On Frameworks:
For building out the core UI components, we've decided to trial out Phase 1 MVP of the Wallet Kernel with Web Components (zero-framework) rather than React. There may be a few benefits for us:
- Easier for 3rd party WK implementers (e.g. CCSP solutions) to reuse
- Simpler dev tooling (likely no need for bundlers or other complicated build configs)
- Smaller bundle sizes
The potential downsides here are less dev familiarity, and more work to implement basic functionality. After delivering Phase 1, we'll reexamine any specific pain points that arose and whether we'd want to switch to React (at this point, the idea is that we haven't implemented "too much" for a switch to be painful) or continue to production with WC.
Implementation approach:
- Library
- Create
core/wallet-ui-components
to provide implementations of individual UI components - Components should cleanly decouple logic from presentation. I.e. they should not make network requests directly, but receive data externally and display it.
- Create
- Web frontend (for HTTP WK)
- Keep the UI implementation within the same package (something like
clients/remote/src/frontend
) - Have a yarn script that compiles the TS to JS to some output dir, and then serve it statically in Express
- Keep the UI implementation within the same package (something like
- Extension/desktop
- Can be developed with any framework, just import components as dependency and build normally
- SDK
- The "discovery" popup: this popup window is not a page hosted by any server, but is generated dynamically. If using web components, we can just drop it in.
Metadata
Metadata
Assignees
Labels
No labels