-
Notifications
You must be signed in to change notification settings - Fork 268
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
Add Type
column to peers window, update peer details name/tooltip
#179
Add Type
column to peers window, update peer details name/tooltip
#179
Conversation
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.
ACK 09aa053
I love this! I was just thinking about how this would be a good feature today, you beat me to it. Code looks good to me. Tested on macOS Big Sur 11.1 with Qt 5.15.2
Thanks! Though I should drop the relay type from inbound or check if full or block (same in -netinfo). |
Concept ACK. |
5e605a4
to
816fc10
Compare
816fc10
to
a657b0c
Compare
Rebased after merge of #163, added relay type for inbounds, and inversed the sort for the |
case PeerTableModel::Direction: | ||
return pLeft->fInbound > pRight->fInbound; | ||
case PeerTableModel::ConnectionType: | ||
return pLeft->m_conn_type < pRight->m_conn_type; |
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.
Memo to myself, if we prefer to sort alphabetically by type name rather than by enum order:
- return pLeft->m_conn_type < pRight->m_conn_type;
+ return GUIUtil::ConnectionTypeToShortQString(pLeft->m_conn_type, pLeft->fRelayTxes) < GUIUtil::ConnectionTypeToShortQString(pRight->m_conn_type, pRight->fRelayTxes);
a657b0c
to
9f76ba6
Compare
Thank you @hebasto for your feedback! Updated with your suggestions per |
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.
ACK 9f76ba6, tested on Linux Mint 20.1 (Qt 5.12.8):
re-ACK 9f76ba6, tested on macOS Big Sur 11.1 (Qt 5.15.2) |
Why are Outbound/Inbound strings better than arrows? |
Good question. I proposed words instead of arrows for these reasons:
|
Words use a lot more space than arrows... It's not unreasonable to have details show more .. detail :p |
Actually, words simplify the GUI for new-comers, as an "arrow up" does not imply "outbound" at all. |
Agree. And the GUI uses words for the direction in the main info tab. |
(If space is an issue we could use in/out instead of inbound/outbound, as that is the wording in the GUI info tab, -getinfo, and -netinfo) |
I was thinking about it from the beginning, but it won't work for some translations. |
I think we should stick with |
I was thinking something more like this: jonatack/gui@add-peers-dir-and-type-columns...luke-jr:tmp_gui_peers_dir_arrows |
I suppose we could also do icons with an arrow and tiny in/out text under it |
This worked for me... Most of the issues you may run into - I already figured out... |
This current PR with 2 ACKs is my preferred version among the various proposals I have seen. |
I propose that further refinements be done in a follow-up (not by me ;). |
Something I didn't get to yet - was to separate the uacomment and give it its own column. |
jonatack/gui@add-peers-dir-and-type-columns...luke-jr:tmp_gui_peers_dir_arrows is now translation-friendly... I'm still weak concept nack on inbound/outbound as strings in the table. I think it's worse than the status quo, so would rather this not be merged as-is. |
Moving this back to |
9f76ba6
to
be4cf48
Compare
Ready for review again. Three changes from the previous version:
I hope the translations work correctly in this latest push. @hebasto, @jarolrod, @luke-jr, @RandyMcMillan, would you mind having another look? |
Type
column to peers window, update peer details name/tooltip
ACK be4cf48 Tested with Spanish translations. The text added in the |
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.
Tested ACK be4cf48 on Ubuntu 20.04 on VMWare.
Removing "Peer" from the "Peer Id" column would allow for more prudent use of space. Maybe Type and Network should be left justified? NOTE: #202 PR #202 is going to allow for more info/columns to be added - and more info displayed "at a glance". As more columns are added - the columns can be adjusted for a tighter fit and/or column stretching in a resize event. ACK 6fc72bd macOS 10.14.6 (18G103) |
… peer details name/tooltip be4cf48 gui: update to "Direction/Type" peer details name/tooltip (Jon Atack) 1518883 gui: add "Type" column to Peers main window (Jon Atack) 6fc72bd gui: allow ConnectionTypeToQString to prepend direction optionally (Jon Atack) Pull request description: This pull: - adds a sortable `Type` column to the GUI Peers tab window - updates the peer details row to `Direction/Type`, so the `Type` column without a direction makes sense (the tooltip is also updated) ![Screenshot from 2021-02-06 22-53-11](https://user-images.githubusercontent.com/2415484/107130646-973bee80-68c7-11eb-9025-b18394ac5c93.png) ACKs for top commit: jarolrod: ACK be4cf48 leonardojobim: Tested ACK bitcoin-core/gui@be4cf48 on Ubuntu 20.04 on VMWare. Tree-SHA512: 6c6d1dbe7d6bdb616acff0aaf8f4223546f1d2524566e9cd6e5b1b3bed2be1e9b20b1bc52ed3b627df53ba1f2fe0bc76f036cf16ad934d8a446b515d9bece3b1
This pull:
Type
column to the GUI Peers tab windowDirection/Type
, so theType
column without a direction makes sense (the tooltip is also updated)