Skip to content
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

Allow users to use p2p-keys to publish content #15422

Closed
spylogsster opened this issue Apr 21, 2021 · 4 comments · Fixed by brave/brave-core#8706
Closed

Allow users to use p2p-keys to publish content #15422

spylogsster opened this issue Apr 21, 2021 · 4 comments · Fixed by brave/brave-core#8706
Assignees
Labels
design A design change, especially one which needs input from the design team OS/Desktop QA Pass-macOS QA/Yes release-notes/include

Comments

@spylogsster
Copy link

spylogsster commented Apr 21, 2021

Description

  • Add a new block to the IPFS Settings to manage p2p-keys:
    image

  • the self item would be the default key shown as disabled which you can’t remove

  • In the context menus add a submenu to select existing key or a new one, if new one selected the user will be navigated to the settings page keys management block

  • if no keys selected the content will be published to IPFS only, otherwise to IPNS
    image

@spylogsster spylogsster self-assigned this Apr 21, 2021
@spylogsster spylogsster changed the title Allow user to use p2p-keys to publish content Allow users to use p2p-keys to publish content Apr 22, 2021
@spylogsster
Copy link
Author

related issues #14774 and #14770

@rebron rebron added the design A design change, especially one which needs input from the design team label May 6, 2021
@rebron
Copy link
Collaborator

rebron commented May 6, 2021

@karenkliu Are you ok with this location in the menu?
https://user-images.githubusercontent.com/2965009/117155058-1fe20200-adc5-11eb-897f-8556a49616f6.png

Possibly move options to More Tools section.

More Tools >

Share local file using IPFS >
Share local folder using IPFS >

Clear Browsing Data...
Task Manager

lidel added a commit to ipfs/kubo that referenced this issue May 7, 2021
Export does not require repo lock and it is safe to do even when ipfs
daemon is running. This enables apps like Brave browser to do
import/export without stopping/starting daemon.

Ref. brave/brave-browser#15422
@karenkliu
Copy link

@rebron Have it as a top-line item in the menu makes it easier to find, so I think this is fine. However it doesn't make sense that it gets its own section. I would think of it as an additional browser feature and put it underneath Sync without a divider line.

@spylogsster spylogsster added this to the 1.26.x - Nightly milestone May 14, 2021
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label May 27, 2021
@stephendonner
Copy link

Verified PASSED using the testplan in brave/brave-core#8706 with build

Brave 1.26.43 Chromium: 91.0.4472.77 (Official Build) beta (x86_64)
Revision 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS macOS Version 11.4 (Build 20F71)

Partially verified (majority of publishing files/folders) via #16020 (comment), which covers the following:

  • Check publishing for all IPFS import local menu items: folder or file
  • If publishing was successful the IPNS link should be copied

Publishing new content over old one for same key should be successful

Steps:

  1. new profile, launch Brave
  2. load ipns://brantly.eth
  3. click Use a local node
  4. load wikipedia.org
  5. File | Save Page As... and click Save
  6. load brave://settings/ipfs/keys
  7. click Add
  8. type newkey and click Generate
  9. click on the "hamburger" menu and choose IPFS -> Share Local File Using IPFS
  10. choose newkey from the flyout
  11. browse to Wikipedia.html and click Open
  12. wait
  13. paste the link copied to the clipboard into a new tab, and load it
  14. wait
  15. confirm you can load the page over IPNS
  16. click on the "hamburger" menu and choose IPFS -> Share Local File Using IPFS
  17. choose newkey from the flyout
  18. browse to Wikipedia.html and click Open
  19. wait
  20. paste the link copied to the clipboard into a new tab, and load it
  21. wait
  22. confirm you can load the page over IPNS
  23. load brave://ipfs-internals/
  24. click on My Node
  25. click on Files
  26. click on brave-imports
  27. click on the date-stamped directory
  28. ensure there is only one copy of the same file, and that is has the same filesize
example example example example example
Screen Shot 2021-05-27 at 3 53 48 PM Screen Shot 2021-05-27 at 3 54 03 PM Screen Shot 2021-05-27 at 3 56 08 PM Screen Shot 2021-05-27 at 3 25 31 PM Screen Shot 2021-05-27 at 3 28 27 PM

If the IPFS node is stopped or keys are not available, the to-be-published items should not be added

Steps:

  1. new profile, launch Brave
  2. load ipns://brantly.eth
  3. click Use a local node
  4. load wikipedia.org
  5. File | Save Page As... and click Save
  6. load brave://settings/ipfs/keys
  7. click Add
  8. type newkey and click Generate
  9. load brave://ipfs-internals/
  10. click on the "hamburger" menu and choose IPFS -> Share Local File Using IPFS
  11. choose newkey from the flyout
  12. browse to Wikipedia.html and click Open
  13. click the Stop button on brave://ipfs-internals/
  14. wait a couple minutes
  15. confirm Wikipedia.html wasn't added, you didn't get a system-level notification, and there's no link for it in your clipboard
  16. click Start
  17. click My Node
  18. click on Files
  19. click on brave-imports
  20. click on the date-stamped directory
  21. confirm you see Wikipedia.html
  22. paste the link from your clipboard, and confirm you see the Wikipedia page
example example example example example example
Screen Shot 2021-05-27 at 4 01 04 PM Screen Shot 2021-05-27 at 4 01 12 PM Screen Shot 2021-05-27 at 4 01 32 PM Screen Shot 2021-05-27 at 4 07 23 PM Screen Shot 2021-05-27 at 4 07 18 PM Screen Shot 2021-05-27 at 4 10 09 PM

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design A design change, especially one which needs input from the design team OS/Desktop QA Pass-macOS QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants