-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Goal
The goal is to bootstrap the project, familiarize ourselves with some of the technical details and constraints, and to build a functional prototype for the Receiver launcher. The prototype should be opened and closed using a floating launch button and we should be able to pass the user's connected wallet to the iframe.
Overview
Relay Receiver is implemented as an iframe that points at relay.cc. Most of the application functionality is implemented in the Relay repo. The functionality required in this repo is:
- window management
- communication between the Receiver window and the host site
Some technical preferences/details:
- This project and library should be pretty light and I'd like to keep things as straightforward as possible.
- Window management is a pretty straightforward global state kind of thing.
React.Contextwould probably work but I'd be ok with usingzustandbecause I don't likeContextandzustandis great. - Vanilla CSS is probably ideal
comlinkfor theiframeto host site communication.comlinkis small, battle-tested, and we're already using it in xmtp-hooks- There's two primary kinds of data that need to flow between the host and the
iframe: open/close events and the user's connected wallet. I can/will provide more details about wallets.
References
- An example project doing something similar https://github.com/papercups-io/chat-widget
comlinkhttps://github.com/GoogleChromeLabs/comlink
Spec
More info coming soon.
Reactions are currently unavailable