Peers window Peer id improvements #290

pull jonatack wants to merge 2 commits into bitcoin-core:master from jonatack:peer-id-improvements changing 3 files +3 −3
  1. jonatack commented at 2:50 pm on April 23, 2021: contributor

    This patch:

    • renames the peers tab column header from Peer Id to Peer to allow resizing the column more tightly (this will be particularly useful after #256) and does the same for the peer details area.

    • center-aligns the entries in the Peer column to align them under the column header rather than to the left (I also tried right-alignment but the values are unreadably close to the Address values and it seems more esthetic to be aligned under the header :file_cabinet:)

    Screenshot from 2021-04-23 16-43-21

  2. gui: rename "Peer Id" to "Peer" in tab column and details area
    to allow resizing the column more tightly
    b12165bcb8
  3. gui: center-align the entries in the peers tab "Peer" column
    This aligns them under the column header.
    e14d79f11e
  4. hebasto added the label Design on Apr 23, 2021
  5. RandyMcMillan commented at 6:42 pm on April 23, 2021: contributor

    Tested on MacOS 10.14.6 (18G103)

    Screen Shot 2021-04-23 at 2 39 25 PM

  6. Talkless approved
  7. Talkless commented at 1:31 pm on April 25, 2021: none
    tACK e14d79f11eaf208b81fc90216304e1e0ea3d673e, tested on Debian Sid with Qt 5.15.2.
  8. Talkless commented at 1:32 pm on April 25, 2021: none

    renaming to Id instead of Peer would work also but I’m not sure about translateability

    What are the concerns exactly?

  9. kristapsk commented at 1:39 pm on April 25, 2021: contributor

    renaming to Id instead of Peer would work also but I’m not sure about translateability

    “Id” seems to be a short for “Identifier” in most of the languages I checked. Are there exceptions for that and languages where “Id” can’t be translated to something similar? https://en.wikipedia.org/wiki/ID

  10. jonatack commented at 2:59 pm on April 25, 2021: contributor
    “Id” is actually incorrect (I think you are referring to “ID”). Outside of databases and developers, “Id” is a somewhat confusing word to use because it has many meanings. See https://www.thefreedictionary.com/id. The link you gave also lists many definitions. It is also an acronym for many different things. For these reasons, I proposed “Peer” to see what reviewers think.
  11. jonatack commented at 3:02 pm on April 25, 2021: contributor
    (Dropped the “Id” part from the PR description.)
  12. in src/qt/peertablemodel.cpp:184 in e14d79f11e
    178@@ -179,9 +179,9 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
    179         assert(false);
    180     } else if (role == Qt::TextAlignmentRole) {
    181         switch (column) {
    182-        case NetNodeId:
    183         case Address:
    184             return {};
    185+        case NetNodeId:
    


    jarolrod commented at 6:05 pm on April 25, 2021:

    In e14d79f11eaf208b81fc90216304e1e0ea3d673e

    Why move the position of NetNodeId here? In the other areas of the code, NetNodeId always comes before Address in our switch statements. I don’t think we should move it here.

    You can keep it where it originally is and do:

    0        case NetNodeId:
    1            return QVariant(Qt::AlignCenter);
    

    jonatack commented at 6:12 pm on April 25, 2021:
    Generally I prefer to propose the smaller, simpler diff. The order doesn’t matter here and it seems better to group the cases by alignment.

    jarolrod commented at 7:32 pm on April 29, 2021:
    It’s not much of a difference, plus this makes it easier to reason about. You are explicitly stating that you are making it AlignCenter. I’d prefer we keep the same order as our other switch statements, but it’s not a strong opinion.

    hebasto commented at 10:06 am on April 30, 2021:
    Always keeping the same order of enum elements in switch statement could decrease mental burden for some ppl :)

    Talkless commented at 5:55 pm on May 3, 2021:
    Ditto, diff is only for “once” (for review), while people will read this switch multiple times in the future, so I’m also for same ordering.
  13. jarolrod commented at 7:33 pm on April 29, 2021: member

    ACK e14d79f11eaf208b81fc90216304e1e0ea3d673e

    % nit about switch statement order

  14. hebasto commented at 8:51 am on April 30, 2021: member

    renaming to Id instead of Peer would work also but I’m not sure about translateability

    btw, a good translation of a noun “peer” that means “a participant of the peer-to-peer network” could be a real challenge, at least in some languages :smiley:

  15. MarcoFalke commented at 8:59 am on April 30, 2021: contributor
    Is there a way to tell translators synonyms? “Connection” might be easier to translate.
  16. jonatack commented at 9:01 am on April 30, 2021: contributor

    Is there a way to tell translators synonyms? “Connection” might be easier to translate.

    Yes, could mention synonyms like “connection, number” in the translator comment.

  17. hebasto commented at 9:04 am on April 30, 2021: member

    One more opinion:

    Removing “Peer” from the “Peer Id” column would allow for more prudent use of space. Otherwise it should be translatable. A simple “ID” or “id” would be better. I think all caps “ID” is better imo.

  18. hebasto commented at 9:05 am on April 30, 2021: member

    Is there a way to tell translators synonyms? “Connection” might be easier to translate.

    Yes, could mention synonyms like “connection, number” in the translator comment.

    We could mention the meaning of a term :)

  19. hebasto commented at 10:02 am on April 30, 2021: member

    Heh, interesting. Should I mention “ID” in a translation comment? (I’m not against using “ID” instead if reviewers prefer but to my mind it reminds me of “papers, please” police_officer)

    If we concern brevity, that the “Peer” word is redundant because the tab is called “Peers”. If we concern consistency, the getpeerinfo output has the id field.

    Anyway, translator comments are always welcome.

    IIRC, there were some comments about aligning of the “Peer Id” column in this repo, especially when numbers of id go up. But I cannot find them :(

    Maybe our fellow designers @Bosch-0 and @GBKS could share their opinions about this PR?

  20. jonatack commented at 3:34 pm on April 30, 2021: contributor

    -netinfo also uses “id”, but ISTM the command line / JSON-RPC interface follows a different paradigm than the GUI:

    • JSON lowercase or snakecase / Capitalized Titles
    • language for developers / language for laypeople
    • brevity / full words
    • untranslated / translated

    As for data alignment in the column, note that I discussed what I tried and found in the PR description.

  21. jonatack commented at 4:13 pm on April 30, 2021: contributor

    It looks like “peers” and “peer” are already translated in qt/locale (if I understand them correctly) in a number of places; here are just a few of them:

     0    <message>
     1        <source>&amp;Peers</source>
     2        <translation>&amp;Gegenstellen</translation>
     3    </message>
     4    <message>
     5        <source>Banned peers</source>
     6        <translation>Gesperrte Gegenstellen</translation>
     7    </message>
     8    <message>
     9        <source>Select a peer to view detailed information.</source>
    10        <translation>Gegenstelle auswählen, um detaillierte Informationen zu erhalten.</translation>
    11    </message>
    
     0    <message>
     1        <source>&amp;Peers</source>
     2        <translation>&amp;Пиры</translation>
     3    </message>
     4    <message>
     5        <source>Banned peers</source>
     6        <translation>Заблокированные пиры</translation>
     7    </message>
     8    <message>
     9        <source>Select a peer to view detailed information.</source>
    10        <translation>Выберите пира для просмотра детальной информации.</translation>
    11    </message>
    
  22. jonatack commented at 8:25 pm on April 30, 2021: contributor
    I’ve decided to close this.
  23. jonatack closed this on Apr 30, 2021

  24. jonatack deleted the branch on Apr 30, 2021
  25. jonatack commented at 10:50 am on May 1, 2021: contributor

    Maybe our fellow designers @Bosch-0 and @GBKS could share their opinions about this PR?

    One thought: designer, UI, and UX can be different specialties, a bit like front end / back end / dev ops / DBA / pentest / embedded, etc. There are designers (say, of icons, logos, typography or illustrations) who wouldn’t expect to be asked to make a call about a UI question, and others who might be more comfortable with that.

  26. jonatack commented at 4:04 pm on May 1, 2021: contributor
    To clarify, I think this is a good change but it’s too much time involved on a very tiny change that may never be merged in a repo that isn’t my main focus. That said, I’d be happy for someone more focused on the GUI to fix it.
  27. hebasto added the label up for grabs on May 1, 2021
  28. jarolrod commented at 3:18 pm on May 26, 2021: member
    @hebasto This is no longer up for grabs as the idea of changing Peer id to Peer was picked up in #311 and the idea of improving the alignment of the Peer Number was picked up in #325
  29. hebasto referenced this in commit 5c041cb348 on May 26, 2021
  30. hebasto removed the label up for grabs on May 26, 2021
  31. hebasto added the label UI on May 26, 2021
  32. hebasto removed the label Design on May 26, 2021
  33. sidhujag referenced this in commit 527de1c174 on May 27, 2021
  34. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me