-
Notifications
You must be signed in to change notification settings - Fork 325
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: leverage IPFS node provided by Brave #956
Conversation
Note: We'll also need to update https://docs.ipfs.io/how-to/companion-node-types accordingly. |
@lidel Sending you a page under separate cover, since I assume we want to just put this on a gateway eventually. Let me know. |
@lidel -- I've added ipfs/ipfs-docs#581 for docs changes. Can you please make any edits you'd like, and merge when the rest of this work is complete? Thank you! |
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.
Made some text changes - I haven't built and inspected in detail, so please LMK if you'd like.
This replaces ipfs:// URI used for triggering activation dropbar with a page that can be updated by Companion to reflect the stage of activation. The page was created by Jessica: #956 (comment)
@jessicaschilling Thanks! I replaced activation trigger to use your onboarding page + trimmed one label (because its displayed only in Brave). |
This PR adds support for IPFS node provided by Brave Nightly (brave/brave-browser#10220) and closes #947
Important!
ipfs/ipfs-docs#581 needs merging once this work is completed so docs are up to date.
TLDR
chrome.ipfs
APIs and adds "Provided by Brave" node type in Preferencesipfs://
yetOnboarding flow (IPFS already enabled in Brave)
When Companion is installed, user is presented with Welcome screen that has "Brave user" section at the very top:
Clicking on "Open Preferences" lets user to choose backend. In brave, "Provided by Brave" is added to the list:
Onboarding flow (IPFS not enabled yet)
The very first time (on an empty profile) is the same as before, but when "Provided by Brave" is selected Companion checks if Brave user selected how to resolve IPFS resources.
If they did not make the choice yet (resolve method being
ask
) we openipfs://
URI in a new tab to trigger the decision via dropbar UI:Companion needs user to click "Enable IPFS" – it will download go-ipfs binary and set local node as the default resolver of
ipfs://
andipns://
URIs.For now, the triggers is just an image, but a dedicated HTML page with some text asking user to click "Enable IPFS" would be better, as downloading go-ipfs binary may take time and user won't see any visual feedback for a while.
Given available APIs, our extension is able to update the tab to indicate a different activation stage and provide some visual feedback:
ipfs init
ipfs daemon
to start@jessicaschilling I think a simple static page(s) similar to #911 would do – are you able to come up with user-friendly text/prompt for the activation steps? First one is the most important, remaining ones are just progress updates.