-
Notifications
You must be signed in to change notification settings - Fork 257
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
Enable wordWrap for Services #293
Enable wordWrap for Services #293
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.
tACK 84612fa, tested on Debian Sid amd64.
PR seems reasonable, that line is really usually long.
I don't care about changing to dots and spaces, IMO good enough as it is, but wouldn't NACK other variants.
Concept ACK, this seems very useful. I think either the current " & " or a ", " separator would be good. Will test. |
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 84612fa. I agree that current "&" separator is ok.
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 84612fa
Here or in a follow-up, it may be a good idea to use either a non-breaking space before the ampersand or a comma-space to avoid the separator splitting to a line by itself. Otherwise this is a great screen space-saver. Thanks!
I experimented with different ways to try to control where it breaks. I will take another look. |
@RandyMcMillan you have two tested ACKs here and it's a nice compact self-contained diff that adds value, so if you find something for that I think you could propose it separately. |
Concept ACK. Thanks for working on this! It has been in my TODO list for a long time :) What if to add another tiny change: --- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -708,7 +708,7 @@ QString formatServicesStr(quint64 mask)
}
if (strList.size())
- return strList.join(" & ");
+ return strList.join("\n");
else
return QObject::tr("None");
} ? Btw, @jonatack's alternative suggestions
also could be implemented in the same line :) |
@RandyMcMillan For nice commit history do you mind changing the prefix in the commit message s/ See: https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#creating-the-pull-request |
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 bd04efe, tested on Linux Mint 20.1 (Qt 5.12.8):
Now it will always use multiple lines even when there is enough horizontal space to only use one? |
Right. Is it bad? |
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.
re-ACK bd04efe. I like this approach with always splitting by newline better than any separator character.
It just trades one dimension for the other. The flexibility of optimizing the available space was what appealed to me. |
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.
You're right, and I agree with you, ceteris paribus. But in this case no other row requires wider space. Therefore, making the column wider is not an optimal way to use the available area. |
If the user prefers a wider space to a higher one, the flexible version allows the user to do it with no downside. Edit: I'd suggest the comma-space separator as it requires fewer characters and is a well-understood separator. |
It only adds vertical size to reduce the horizontal size, I don't see why it's better than the flexibility of the original version to allow the user to optimize the space. :shrugging: |
The downside of such approach is that some services, that are not placed in the beginning of the line, could just miss user's attention. Of course, it's a minor one. |
I lean toward a UI that avoids horizontal scroll bars. |
I agree with @jonatack, flexible approach would be better IMO, i.e. without "forced" newlines. |
fb5e880 -- looking at the diff lines count I see +7/-3. If drop unrelated changes, it could be +4/-1. |
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.
tACK a0f7978 on same environment as previously. |
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.
re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2).
a0f7978 qt: enable wordWrap for peers-tab detail services (randymcmillan) Pull request description: Enable wordWrap for peers-tab detailView Services ACKs for top commit: Talkless: tACK a0f7978 on same environment as previously. hebasto: ACK a0f7978, tested on Linux Mint 20.1 (Qt 5.12.8): kristapsk: re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2). Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
a0f7978 qt: enable wordWrap for peers-tab detail services (randymcmillan) Pull request description: Enable wordWrap for peers-tab detailView Services ACKs for top commit: Talkless: tACK a0f7978 on same environment as previously. hebasto: ACK a0f7978, tested on Linux Mint 20.1 (Qt 5.12.8): kristapsk: re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2). Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
a0f7978 qt: enable wordWrap for peers-tab detail services (randymcmillan) Pull request description: Enable wordWrap for peers-tab detailView Services ACKs for top commit: Talkless: tACK a0f7978 on same environment as previously. hebasto: ACK a0f7978, tested on Linux Mint 20.1 (Qt 5.12.8): kristapsk: re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2). Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
a0f7978 qt: enable wordWrap for peers-tab detail services (randymcmillan) Pull request description: Enable wordWrap for peers-tab detailView Services ACKs for top commit: Talkless: tACK a0f7978 on same environment as previously. hebasto: ACK a0f7978, tested on Linux Mint 20.1 (Qt 5.12.8): kristapsk: re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2). Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
a0f7978 qt: enable wordWrap for peers-tab detail services (randymcmillan) Pull request description: Enable wordWrap for peers-tab detailView Services ACKs for top commit: Talkless: tACK a0f7978 on same environment as previously. hebasto: ACK a0f7978, tested on Linux Mint 20.1 (Qt 5.12.8): kristapsk: re-ACK a0f7978. Tested under Gentoo Linux with Xfce4 (Qt 5.15.2). Tree-SHA512: 872e511d2ecfa72fea0fd3284a958b45ee8aee138469ce7f9cd853cd9098b9583917909934b0a5c96f9b81ea1567bcea6a037558829bb79f2a3f413a83df06e6
Enable wordWrap for peers-tab detailView Services