bitcoin-core / gui

Bitcoin Core GUI staging repository
https://github.com/bitcoin/bitcoin
MIT License
603 stars 262 forks source link

Long(V3) Onion address is not wrapped in peer details #262

Open ghost opened 3 years ago

ghost commented 3 years ago

In the upper right corner of the screenshot you can see that the long(V3) Onion address is not wrapped, but cut. Also, the colon before the port is missing, which is confusing.

When you enlarge the detail window, you can see that wrapping automatically works, but only at word-breakpoints, e.g. space or colon.

kein_doppelpunkt

Copying the v3 Onion address and port with the mouse works fine, though. The complete address and port is copied.

hebasto commented 3 years ago

Will a contraction of presented address like fbuf3g…a27cad.onion:8333 work for you?

ghost commented 3 years ago

I would like it better, if the address would be longer than 28 31 characters (which is half of the onion V3 length 56 + : + 5 digit port number) it would get a linefeed wrap after the 28 31th character. I think this would fit well into the window, and there would be no information loss.

But the whole address should be copy-able.

I did not find another way to copy the address, aside of marking it in the details tab with the mouse (this was also the use case made me stumbling upon this issue).

Alternatively, if right-cklicking the address in the main peer window column, there could be a context menu "copy to clipboard". I would like that most.

hebasto commented 3 years ago

@wodry

Do you mind looking into #264?

ghost commented 3 years ago

Do you mind looking into #264?

Have done, thank you very much. If this copy-menu is there, the detail window regarding the node address is not so important anymore, and I could live with a contracted address display like fbuf3g…a27cad.onion:8333 there.

hebasto commented 3 years ago

@wodry

... contracted address display like fbuf3g…a27cad.onion:8333 there.

Done in #276.

jarolrod commented 3 years ago

@wodry can this can be closed since #276 was merged?

I could live with a contracted address display like fbuf3g…a27cad.onion:8333 there.

ghost commented 3 years ago

The use case I stumbled upon this issue was that I wanted to copy a peer address, and it was confusing to try to copy it from the details header where it was not wrapped.

276 (shorten address display with '...' in the middle) is not regarding this issue.

This issue would be solved with a copy entry in the addresses context menu. That was intended with #264, which was closed and then picked up in #318, which is still open, not merged. The "copy address" address context menu entry is missing in current master: screenshot From my point of view, this could be closed when #318 would be merged.

ghost commented 3 years ago

@wodry can this can be closed since #276 was merged?

I could live with a contracted address display like fbuf3g…a27cad.onion:8333 there.

You dropped the first part of my sentence:

"If this copy-menu is there, [...] I could live with a contracted address display like fbuf3g…a27cad.onion:8333 there."

hebasto commented 3 years ago

"If this copy-menu is there, [...] I could live with a contracted address display like fbuf3g…a27cad.onion:8333 there."

The Qt widget which is used to represent peer addresses (i.e., peerWidget which is an instance of QTableView) by default supports copying from a cell to a clipboard with keyboard shortcuts -- Ctrl+C on Linux/Windows, or ⌘+C on macOS.

So, the requested functionality is available in the code base. The new "Copy Address" context menu item just adds another way to perform the same action.