-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keyring-core and the providers duplicate much of w3up-client #295
Comments
+1 reducing layers and eliminating duplicative functionality! The one note I'll add is that it would be nice to be able to opt out of (or at least plug into) the state management stuff in these libraries - UI-level code often wants its own state management semantics and I stubbed my toe a couple times on the spaces/currentSpace state being stored and managed inside our library when I really wanted something at the React level to handle it. Concrete example: when I was working on the space creator, originally I wanted to have the entire space creation process happen in the left nav, but as soon as I called |
per #295 rework the keyring to use w3up-client rather than the lower level access library I'd like to refactor these APIs soon, but for now I'm keeping them unchanged to minimize downstream changes
per #295 rework the keyring to use w3up-client rather than the lower level access library I'd like to refactor these APIs soon, but for now I'm keeping them unchanged to minimize downstream changes I am releasing this as a breaking change - I don't think anything will break, but would prefer to let downstream users opt in to this
What if we significantly simplify our UI layer as minimal wrappers around w3up-client? We may sacrifice some modularity, but would reduce the surface area of what we support (and repeat) here in w3ui.
For context, the original decisions for what code lives in the headless components were made at a time when the w3up-client didn't have any of the functionality we needed. It now manages spaces and and "current space" state internally, which we duplicate here in keyring-core.
As an example... for #293 to export ucan delegations for a space I tried to save time and just copy the implementation from
w3cli
which use thecreateDelegation
method onw3up-client
. But our ui base doesn't provide an instances ofw3up-client
. So i could go grab the lower leveldelegate
method from the access-client agent, but we don't expose the agent from keyring core. I will expose a method in keyring-core to do delegations, and chase it through react-keyring, so i can use it in w3console, but it also exposes that we might have more layers to w3ui than we can afford to maintain right now, and a review of our layering would be prudent.aside: The name
keyring-core
should also be reviewed... it's a wrapper for an agent and spaces rather than a general key management thing.The text was updated successfully, but these errors were encountered: