orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 116 forks source link

Display "connectedness" status #198

Closed haadcode closed 7 years ago

haadcode commented 7 years ago

It's currently really hard to know why things are not working as expected.

It's also really hard to get a feeling of being "connected" in Orbit atm due to no user feedback.

One way to narrow down the possibilities, but to add a valuable user feedback, is to add an element to the UI that display how "connected" you are currently. By "connected" I mean to how many peers are you connected to atm in two different levels: overall (IPFS network peers) and per-pubsub-topic (ie. per channel in Orbit).

When joined on a channel, the UI should display how many peers the channel has. This can be retrieved from IPFS with ipfs.pubsub.peers("channel") which will return the peers that are subscribed to that channel.

For global "connectedness", I think the swarm view is enough to fulfil the goal, but we could improve the UX a bit by making it more constant, ie. display the connected peers somewhere in the UI at all times. This could be something as simple as green-red light for no-peers vs. > 0 peers and by hovering on it it displays the number of connected peers. Or it could be a text like "Peers: 158" if that's more fitting to the general UI style and position. I don't have a strong opinion on this, need to test it with various designs and see what feels good.