-
Notifications
You must be signed in to change notification settings - Fork 865
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
Show number of discovered nodes in the taskbar menu under the running status indicator #1312
Comments
Thanks, @shoce, and apologies for the delayed response. Might this be something you'd be willing to PR? |
@hacdias Wanted to get your opinion on this if you had a minute ...
|
Hey!
That only depends on how often you need the peers count to update. Maybe we could use the same value as IPFS Companion (which by just looking at it seems to be 1 second).
Great question. It would need us to rebuild the entire menu every time. Since it is not visible most of the time, I'm not sure if there are any practical implications.
What I remember reading the last time I searched about it is that it is hard, really really hard. So I'd not go for it. |
Could this be in the tooltip that is displayed when user hovers over the icon (without clicking on it)? |
What about doing both? Just from generalized user testing, someone's tendency to actually use hover hints is a pretty personal trait. |
@jessicaschilling you can probably get the ipfsd object via context after everything is initialized via |
Note that IIUC to have the peer count available for tooltip and menu we would have to periodically poll the Is there a better way that I don't see? @Gozala noted some alternatives to polling in ipfs/ipfs-webui#1536 but it requires go-ipfs changes and unsure if we want to block #1599 on that. |
I spent some time working on this. The primary hurdle being, as discussed in electron/electron#12633 (comment) and specified in the electron docs, menu labels cannot be dynamically changed. I believe a workaround might be rebuilding the menu each time the peer count is polled, but I assume rebuilding the menu with such frequency wouldn't be desirable. |
A tooltip alone would be better than nothing 😊 as long as it's not too expensive ... @lidel, any thoughts? |
The tooltip is not worth it imo: rebuilding menu is not really much more work than the polling itself (sending HTTP request to go-ipfs and parsing response), so if we poll, then it is ok to rebuild menu. But IPFS Desktop is already heavy, and I would like to avoid constant polling for a value that the user will see maybe once a day, or once a week. @sutartmelson are we able to rebuild menu after it is opened? Ideally we would refresh count only when needed. Something like:
|
That is important to see not only that IPFS is running but if it is online i.e. connected to any other nodes. Would be nice to have the number of nodes connected in the menu under the "running" indicator.
The text was updated successfully, but these errors were encountered: