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

Improving UX of IPFS in Address Bar #5218

Closed
lidel opened this issue Jul 11, 2019 · 1 comment
Closed

Improving UX of IPFS in Address Bar #5218

lidel opened this issue Jul 11, 2019 · 1 comment

Comments

@lidel
Copy link

lidel commented Jul 11, 2019

Related to IPFS Integration - Roadmap and discussion: #819

UX challenges

Loading IPFS from public gateways falls under regular HTTP/HTTPS and that is okay.
However when user is running IPFS node on their own machine (provided by ipfs-desktop or experimental embedded js-ipfs+chrome.sockets), they effectively replace HTTP with IPFS transport and it would be beneficial if Browser UI reflected that.

Current state

When content is loaded from IPFS via HTTP Gateway running on the localhost the UX around address bar is pretty rough:

  • URL with IPFS path for a content identified by a CID:

    2019-07-11--15-24-19

  • URL with IPNS path for a website with DNSLink:

    2019-07-11--15-26-52

Problems:

  • raw IP of local gateway is highlighted, but it does not provide any meaning to non-technical user
  • content identifier (CID) is long, faded-out and takes a lot of space
  • http://127.0.0.1 location does not make much sense for content-addressed context
  • security indicator is confusing:
    Browser assumes regular http:// (no encryption/integrity guarantees) while IPFS provides a different set of guarantees that are not reflected in UI:
    • transport encryption between you and your peers
    • payload integrity (hashed payload blocks needs to match requested CID)

Potential improvements

Below are some ideas I discussed with various people (including IPFS Camp).
This is by no means a final design: the goal of this issue is to start the conversation about the UX in address bar and find a sweet spot between what is technically feasible and what would produce good UX. Please provide feedback in the comments.

Prerequisite: detect requests to local gateway

Brave should be able to tell when local Origin is backed by IPFS.

One way to implement this is to leverage IPFS Companion extension. When it is installed, the address of local gateway can be read from its browser.storage.local: the URL is under a key named customGatewayUrl (eg. http://127.0.0.1:8080).

(1) Hide local gateway from address bar

Low hanging fruit is to detect that content was loaded from IPFS and change the way address bar shows address to the user. Prior art from Beaker Browser:

2019-07-11--16-16-39

In content-addressed contexts the location of local gateway does not bring any additional meaning. I documented initial exploration of how IPFS addresses could look like if we drop local gateway from the UI:

  • We know content comes from trusted local gateway. Let's show only the IPFS path:
    2019-07-11--15-24-19
  • CID indicates the content root, so we want to highlight it:
    2019-07-11--15-24-19
  • At the same time CID is not human-readable, so we may just show short version by default:
    2019-07-11--15-24-19
    which gives more space for content paths after it:
    61057290-44513b00-a3f5-11e9-8d50-fc44df9dacd
    • for CID we care about first 2 (familiarity) and last 4+ characters
      (this gives user low quality uniqueness for quick eyeballing)
    • this is similar to what Github does with commit hashes
  • Path-addressing can be replaced with regular protocol-looking ipfs:// and ipns:// if it makes implementation easier:
    61059362-2b4a8900-a3f9-11e9-9f93-8981b86c9d92
    • Note: if this is more than visual tweak and ipfs:// becomes a real protocol handler, we get proper Origin-based separation per CID and can mark all IPFS pages loaded from local node as secure context

(2) Enable user to inspect transport details

Right now the default warning indicator for unencrypted http:// is displayed, and clicking on it shows this message:

2019-07-11--16-39-21

Instead, an icon could indicate IPFS transport was used for loading the site:

61059923-21755580-a3fa-11e9-9502-c79ac35cb5c7

Clicking on it could open small popup informing user about IPFS details.
Initially it could be info about the gateway we removed from address bar:

2019-07-11--16-39-21

For the MVP just showing the URL of local gateway should be enough. In the future this popup could be a place that shows more details about the protocol, eg. include information about payload integrity, type of encrypted transports, state of peers, DHT (public/private) etc.


@bbondy @yrliou @autonome @olizilla

@rebron rebron added the priority/P4 Planned work. We expect to get to it "soon". label Jul 12, 2019
@RubenKelevra
Copy link

This is superseeded by recent changes in the IPFS-Daemon/IPFS-Plugin and can be closed. :)

@rebron rebron added closed/not-actionable and removed priority/P4 Planned work. We expect to get to it "soon". labels May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants