-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: share spaces via email #123
Conversation
Website preview 🔗✨ |
08c9d4b
to
9e121e7
Compare
9e121e7
to
024de7a
Compare
src/share.tsx
Outdated
|
||
const next = { email: delegatedEmail, capabilities: delegation.capabilities.map(c => c.can) } | ||
setSharedEmails(prev => { | ||
if (prev.some(item => item.email === next.email)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...should probably also check same set of capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I understood that. The idea was to check the e-mail so we don't add it twice to the shared list on the UI. The capabilities are always the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah...not sure what I was thinking there...maybe I was thinking capabilities were the usual can, with, nb
. We typically refer to the "can" as an ability, with "capability" as can, with, nb
. Might be an idea to rename to abilities
?
src/share.tsx
Outdated
|
||
const next = { email: delegatedEmail, capabilities: delegation.capabilities.map(c => c.can) } | ||
setSharedEmails(prev => { | ||
if (prev.some(item => item.email === next.email)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah...not sure what I was thinking there...maybe I was thinking capabilities were the usual can, with, nb
. We typically refer to the "can" as an ability, with "capability" as can, with, nb
. Might be an idea to rename to abilities
?
Everything else looks great, but please revert the dep bump because there's still an issue that needs to be resolved before we can do that. |
0c43ae0
to
ab20323
Compare
a6bd991
to
8859ae4
Compare
8859ae4
to
9bbcd5b
Compare
🤖 I have created a release *beep* *boop* --- ## [1.11.0](w3console-v1.10.0...w3console-v1.11.0) (2024-09-24) ### Features * share spaces via email ([#123](#123)) ([896079b](896079b)) ### Bug Fixes * import space preview ([#127](#127)) ([1f2acf6](1f2acf6)) * share space via ucan file ([#126](#126)) ([ba934a2](ba934a2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Add Share via Email Feature
Context:
This PR introduces the Share via Email feature, allowing users to share spaces using either an email address or DID. Depending on the input, we render different buttons and actions (e.g., sharing via email or generating a downloadable UCAN). Once shared via email, the “Shared With” panel lists all shared emails (did:mailto) along with their capabilities, fetched from the delegations stored in the client.
Short Demo:
https://www.loom.com/share/b33ee2f22a5b44628e5d9fc3d599dbf7?sid=0b008211-fc28-4cd4-a716-e67f44067661
Minor Notes: