Hide peers details #505

pull RandyMcMillan wants to merge 1 commits into bitcoin-core:master from bitcoincore-dev:1639351552-issue-485 changing 2 files +113 −36
  1. RandyMcMillan commented at 11:34 pm on December 12, 2021: contributor

    Add a close (X) button to the Peers Detail panel. Reuse the same icon used in the Console Tab. The close button deselects the peer highlighted in the PeerTableView and hides the detail panel.

    fixes #485

    Co-authored-by: [@w0xlt](/bitcoin-core-gui/contributor/w0xlt/) <w0xlt@users.noreply.github.com>
  2. RandyMcMillan commented at 11:35 pm on December 12, 2021: contributor
    Screen Shot 2021-12-12 at 6 41 53 PM
  3. RandyMcMillan commented at 11:46 pm on December 12, 2021: contributor

    Tooltip message for better UX.

    Screen Shot 2021-12-12 at 6 45 24 PM

  4. jarolrod added the label Feature on Dec 13, 2021
  5. jarolrod added the label UX on Dec 13, 2021
  6. in src/qt/rpcconsole.cpp:558 in 40ebab7063 outdated
    554@@ -555,6 +555,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
    555     ui->lineEdit->setMaxLength(16 * 1024 * 1024);
    556     ui->messagesWidget->installEventFilter(this);
    557 
    558+    connect(ui->hidePeersDetailButton, &QAbstractButton::clicked, [this] { hidePeersDetail(); });
    


    promag commented at 3:55 pm on December 13, 2021:

    Just

    0connect(ui->hidePeersDetailButton, &QAbstractButton::clicked, this, &RPCConsole::clearSelectedNode);
    

    and ditch hidePeersDetails.

  7. promag commented at 3:58 pm on December 13, 2021: contributor

    We reuse the same icon used in the Console Tab for Gui consistency.

    How so? One clears the console while the other unselects the peer.

  8. RandyMcMillan commented at 4:40 pm on December 13, 2021: contributor

    Is there a better icon to use for a “close” action?

    We don’t have a “clear” icon in the repo - but something like this would be more appropriate for “clear console”. So reusing the (X) icon seems prudent.

  9. luke-jr commented at 10:23 pm on December 13, 2021: member
    Since it’s possible to select multiple peers, but only one shows in the panel, perhaps leaving the “close” button is best, but don’t have it deselect?
  10. in src/qt/forms/debugwindow.ui:995 in 40ebab7063 outdated
    1022-             </property>
    1023-             <property name="textInteractionFlags">
    1024-              <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
    1025-             </property>
    1026-            </widget>
    1027+             <item>
    


    jarolrod commented at 7:26 am on December 14, 2021:
    could you try to minimize the diff on this file, I don’t think all this moving around and changes would be required to add the button. QtCreator creates a lot of junk, try to pinpoint the minimal diff required to add the button.

    RandyMcMillan commented at 4:21 pm on January 31, 2022:
    To avoid re-adding diff junk to the debugwindow.ui file - I prefer to add translator comments in a follow up PR.
  11. in src/qt/forms/debugwindow.ui:1073 in 40ebab7063 outdated
    1100+                  <width>32</width>
    1101+                  <height>32</height>
    1102+                 </size>
    1103+                </property>
    1104+                <property name="toolTip">
    1105+                 <string>Hide Peers Detail</string>
    


    jarolrod commented at 7:28 am on December 14, 2021:
    you can add a translator comment to this string by using the extracomment property. I have written some notes on constructing translator comments here: translator-comments.md

    RandyMcMillan commented at 6:55 pm on November 15, 2022:
    @jarolrod - if you want to post a patch - I will apply it and give you attribution.

    RandyMcMillan commented at 2:50 pm on September 20, 2023:
    @jarolrod - I will do a follow up for translator comments.
  12. jarolrod commented at 7:37 am on December 14, 2021: member

    concept ACK @luke-jr

    Since it’s possible to select multiple peers, but only one shows in the panel

    Since #13 this is not possible. If multiple peers are selected, the panel will not show

  13. RandyMcMillan force-pushed on Dec 14, 2021
  14. RandyMcMillan commented at 10:06 pm on December 14, 2021: contributor
    I split this PR into 2 commits so others can experiment with adding the button to src/qt/forms/debugwindow.ui Feel free to fetch this branch and experiment.
  15. RandyMcMillan marked this as a draft on Dec 14, 2021
  16. RandyMcMillan marked this as ready for review on Dec 22, 2021
  17. DrahtBot commented at 10:52 am on December 30, 2021: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK pablomartin4btc, hebasto
    Concept ACK jarolrod
    Stale ACK rsafier, w0xlt, hernanmarino

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  18. w0xlt approved
  19. w0xlt commented at 10:52 am on January 23, 2022: contributor
    tACK 205c965 on Ubuntu 21.10 (Qt 5.15.2).
  20. RandyMcMillan commented at 11:03 pm on January 23, 2022: contributor
    @w0xlt any suggestions on reducing the diff in the .ui file would be appreciated - this is left unsquashed to allow for suggestions/variations
  21. DrahtBot added the label Needs rebase on Jan 28, 2022
  22. w0xlt commented at 10:50 pm on January 28, 2022: contributor

    @RandyMcMillan

    You can delete the last commit (git reset --hard 718589f) and apply the patch below.

      0diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
      1index 15e0d3fad..ad671b02e 100644
      2--- a/src/qt/forms/debugwindow.ui
      3+++ b/src/qt/forms/debugwindow.ui
      4@@ -984,6 +984,117 @@
      5            </size>
      6           </property>
      7           <layout class="QVBoxLayout" name="verticalLayout_8">
      8+            <item>
      9+              <layout class="QHBoxLayout" name="horizontalLayout_8">
     10+                <property name="topMargin">
     11+                  <number>0</number>
     12+                </property>
     13+                <property name="bottomMargin">
     14+                  <number>0</number>
     15+                </property>
     16+                <item>
     17+                  <widget class="QLabel" name="peerHeading">
     18+                  <property name="sizePolicy">
     19+                    <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
     20+                    <horstretch>0</horstretch>
     21+                    <verstretch>0</verstretch>
     22+                    </sizepolicy>
     23+                  </property>
     24+                  <property name="minimumSize">
     25+                    <size>
     26+                    <width>0</width>
     27+                    <height>32</height>
     28+                    </size>
     29+                  </property>
     30+                  <property name="font">
     31+                    <font>
     32+                    <pointsize>10</pointsize>
     33+                    </font>
     34+                  </property>
     35+                  <property name="cursor">
     36+                    <cursorShape>IBeamCursor</cursorShape>
     37+                  </property>
     38+                  <property name="text">
     39+                    <string>Select a peer to view detailed information.</string>
     40+                  </property>
     41+                  <property name="alignment">
     42+                    <set>Qt::AlignHCenter|Qt::AlignTop</set>
     43+                  </property>
     44+                  <property name="wordWrap">
     45+                    <bool>true</bool>
     46+                  </property>
     47+                  <property name="textInteractionFlags">
     48+                    <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
     49+                  </property>
     50+                  </widget>
     51+                </item>
     52+                <item>
     53+                  <widget class="QWidget" name="hidePeersDetail" native="true">
     54+                    <property name="enabled">
     55+                      <bool>true</bool>
     56+                    </property>
     57+                    <property name="minimumSize">
     58+                      <size>
     59+                        <width>32</width>
     60+                        <height>32</height>
     61+                      </size>
     62+                    </property>
     63+                    <property name="maximumSize">
     64+                      <size>
     65+                        <width>32</width>
     66+                        <height>32</height>
     67+                      </size>
     68+                    </property>
     69+                    <widget class="QToolButton" name="hidePeersDetailButton">
     70+                      <property name="geometry">
     71+                        <rect>
     72+                          <x>0</x>
     73+                          <y>0</y>
     74+                          <width>32</width>
     75+                          <height>32</height>
     76+                        </rect>
     77+                      </property>
     78+                      <property name="minimumSize">
     79+                        <size>
     80+                          <width>32</width>
     81+                          <height>32</height>
     82+                        </size>
     83+                      </property>
     84+                      <property name="baseSize">
     85+                        <size>
     86+                          <width>32</width>
     87+                          <height>32</height>
     88+                        </size>
     89+                      </property>
     90+                      <property name="toolTip">
     91+                        <string>Hide Peers Detail</string>
     92+                      </property>
     93+                      <property name="layoutDirection">
     94+                        <enum>Qt::LeftToRight</enum>
     95+                      </property>
     96+                      <property name="text">
     97+                        <string />
     98+                      </property>
     99+                      <property name="icon">
    100+                        <iconset resource="../bitcoin.qrc">
    101+                          <normaloff>:/icons/remove</normaloff>
    102+                          :/icons/remove
    103+                        </iconset>
    104+                      </property>
    105+                      <property name="iconSize">
    106+                        <size>
    107+                          <width>22</width>
    108+                          <height>22</height>
    109+                        </size>
    110+                      </property>
    111+                      <property name="shortcut">
    112+                        <string>Ctrl+X</string>
    113+                      </property>
    114+                    </widget>
    115+                  </widget>
    116+                </item>
    117+              </layout>
    118+            </item>
    119            <item>
    120             <widget class="QLabel" name="peerHeading">
    121              <property name="sizePolicy">
    
  23. RandyMcMillan renamed this:
    RPCConsole: add hidePeersDetail() button and functionality
    RPCConsole: add hidePeersDetailButton and connect to RPCConsole::clearSelectedNode
    on Jan 29, 2022
  24. RandyMcMillan commented at 9:00 pm on January 29, 2022: contributor
    @w0xlt - applied the patch - thanks for the collaboration! attribution included in commit message. I also implemented @promag’s suggestion - much more prudent approach! - thanks!
  25. RandyMcMillan force-pushed on Jan 29, 2022
  26. RandyMcMillan commented at 9:27 pm on January 29, 2022: contributor

    Commit: 2ae79d0954c46862535114c0d3f7bcfe2837918f

  27. rsafier commented at 10:15 pm on January 29, 2022: none
    tACK 2ae79d0 on ARM M1/macOS/Monterey 12.1 (Qt 5.15.2)
  28. DrahtBot removed the label Needs rebase on Jan 29, 2022
  29. w0xlt approved
  30. w0xlt commented at 3:21 pm on January 30, 2022: contributor
    reACK 2ae79d0
  31. RandyMcMillan commented at 4:24 pm on January 31, 2022: contributor

    To avoid re-adding diff junk to the debugwindow.ui file - I prefer to add translator comments in a follow up PR.

  32. RandyMcMillan marked this as a draft on Feb 17, 2022
  33. hebasto commented at 4:06 pm on October 26, 2022: member
    @RandyMcMillan Still working on this PR?
  34. RandyMcMillan force-pushed on Nov 15, 2022
  35. RandyMcMillan requested review from w0xlt on Nov 15, 2022
  36. RandyMcMillan marked this as ready for review on Nov 15, 2022
  37. RandyMcMillan removed review request from w0xlt on Nov 15, 2022
  38. RandyMcMillan requested review from jarolrod on Nov 15, 2022
  39. RandyMcMillan commented at 7:04 pm on November 15, 2022: contributor
    rebase: d59363aaa0f39da8f27fead0b8e5b0c1a5a32226
  40. hernanmarino approved
  41. hernanmarino commented at 9:50 pm on June 19, 2023: contributor
    utACK d59363aaa0f39da8f27fead0b8e5b0c1a5a32226 I ’d like to see this implemented.
  42. DrahtBot added the label CI failed on Aug 18, 2023
  43. DrahtBot removed the label CI failed on Aug 23, 2023
  44. DrahtBot added the label CI failed on Aug 31, 2023
  45. DrahtBot removed the label CI failed on Sep 4, 2023
  46. DrahtBot added the label CI failed on Sep 13, 2023
  47. in src/qt/forms/debugwindow.ui:996 in d59363aaa0 outdated
    991+                </property>
    992+                <property name="bottomMargin">
    993+                  <number>0</number>
    994+                </property>
    995+                <item>
    996+                  <widget class="QLabel" name="peerHeading">
    


    pablomartin4btc commented at 7:14 pm on September 17, 2023:
    Looks like this structure is duplicated, is this correct?

    RandyMcMillan commented at 0:42 am on March 28, 2024:
    thanks - taking a look right now.

    RandyMcMillan commented at 1:48 am on March 28, 2024:
    thank you!
  48. pablomartin4btc commented at 7:21 pm on September 17, 2023: contributor

    tACK d59363aaa0f39da8f27fead0b8e5b0c1a5a32226

    nit: I’d update both the title of the PR and the commit subject line for something more meaningful or concise, it would provide clarity of the changes being made. In the specific case of the commit subject line it’s recommended to keep its length 50 chars max according to the guidelines. Perhaps something like gui: Add close Peers detail panel feature could work.

    If you mention “fix” follow by the issue # it will link them both together.

  49. DrahtBot requested review from w0xlt on Sep 17, 2023
  50. DrahtBot removed review request from w0xlt on Sep 17, 2023
  51. DrahtBot requested review from w0xlt on Sep 17, 2023
  52. DrahtBot removed the label CI failed on Sep 18, 2023
  53. RandyMcMillan renamed this:
    RPCConsole: add hidePeersDetailButton and connect to RPCConsole::clearSelectedNode
    gui: Add close Peers detail panel feature
    on Sep 20, 2023
  54. RandyMcMillan commented at 1:29 pm on September 20, 2023: contributor
    @pablomartin4btc - great suggestion - thanks!
  55. DrahtBot removed review request from w0xlt on Sep 20, 2023
  56. DrahtBot requested review from w0xlt on Sep 20, 2023
  57. pablomartin4btc commented at 2:25 pm on September 20, 2023: contributor

    @pablomartin4btc - great suggestion - thanks!

    You are welcome, the “gui:” prefix, IMO, would be more for the commit subject line, since we are already on the gui repo, we would’t need to clarify it in the PR title.

  58. DrahtBot removed review request from w0xlt on Sep 20, 2023
  59. DrahtBot requested review from w0xlt on Sep 20, 2023
  60. RandyMcMillan renamed this:
    gui: Add close Peers detail panel feature
    Add close Peers detail panel feature
    on Sep 20, 2023
  61. RandyMcMillan renamed this:
    Add close Peers detail panel feature
    Hide Peers Detail Button
    on Sep 20, 2023
  62. DrahtBot removed review request from w0xlt on Sep 20, 2023
  63. DrahtBot requested review from w0xlt on Sep 20, 2023
  64. RandyMcMillan commented at 3:44 pm on September 20, 2023: contributor

    @pablomartin4btc - I am just grateful for the interest - I had forgotten about this PR :)

    retesting on MacOS X86_64 Arm64 right now.

  65. DrahtBot removed review request from w0xlt on Sep 20, 2023
  66. DrahtBot requested review from w0xlt on Sep 20, 2023
  67. DrahtBot added the label CI failed on Oct 25, 2023
  68. DrahtBot commented at 2:34 pm on February 5, 2024: contributor

    🤔 There hasn’t been much activity lately and the CI seems to be failing.

    If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn’t been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.

  69. hebasto commented at 10:12 pm on February 11, 2024: member
    This #505 (review) still needs to be addressed.
  70. DrahtBot removed review request from w0xlt on Feb 11, 2024
  71. DrahtBot requested review from w0xlt on Feb 11, 2024
  72. RandyMcMillan force-pushed on Mar 28, 2024
  73. RandyMcMillan commented at 1:51 am on March 28, 2024: contributor

    436ac4f duplicate ui element removed per @pablomartin4btc comment.

    cc: @hebasto @w0xlt

  74. RandyMcMillan requested review from pablomartin4btc on Mar 28, 2024
  75. RandyMcMillan requested review from promag on Mar 28, 2024
  76. RandyMcMillan requested review from hernanmarino on Mar 28, 2024
  77. DrahtBot removed the label CI failed on Mar 28, 2024
  78. pablomartin4btc approved
  79. pablomartin4btc commented at 7:21 pm on March 28, 2024: contributor

    tACK 436ac4f42b88e8131bf1e02554a20b3c549e7d6f

    image

    image

    image

    nit: not a blocker, please consider previous feedback regarding commit title length and meaningfulness, maybe gui: + this PR’s title.

  80. RandyMcMillan commented at 7:23 pm on March 28, 2024: contributor
    Thanks I saw that - I can update the commit message…
  81. RandyMcMillan force-pushed on Mar 28, 2024
  82. DrahtBot added the label CI failed on Mar 28, 2024
  83. DrahtBot commented at 9:16 pm on March 28, 2024: contributor

    🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.

    Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    Leave a comment here, if you need help tracking down a confusing failure.

    Debug: https://github.com/bitcoin-core/gui/runs/23215732626

  84. RandyMcMillan force-pushed on Mar 29, 2024
  85. DrahtBot removed the label CI failed on Mar 29, 2024
  86. RandyMcMillan renamed this:
    Hide Peers Detail Button
    gui: Hide peers details
    on Apr 9, 2024
  87. gui: Hide peers details
    Add a close (X) button to the Peers Detail panel.
    Reuse the same icon used in the Console Tab.
    The close button deselects the peer highlighted
    in the PeerTableView and hides the detail panel.
    This PR addresses issue #485:
    
    Co-authored-by: @w0xlt <w0xlt@users.noreply.github.com>
    41a1a8615d
  88. RandyMcMillan force-pushed on Apr 9, 2024
  89. RandyMcMillan commented at 6:32 pm on April 9, 2024: contributor

    41a1a86: update per previous suggestions

    tACK 436ac4f

    UI look & feel. nit: not a blocker, please consider previous feedback regarding commit title length and meaningfulness, maybe gui: + this PR’s title.

  90. RandyMcMillan renamed this:
    gui: Hide peers details
    Hide peers details
    on Apr 9, 2024
  91. pablomartin4btc approved
  92. pablomartin4btc commented at 7:14 pm on April 9, 2024: contributor
    re ACK 41a1a8615dd48fdd9811b9824c49ceb934c6375e
  93. hebasto approved
  94. hebasto commented at 4:41 pm on July 30, 2024: member
    ACK 41a1a8615dd48fdd9811b9824c49ceb934c6375e, tested on Ubuntu 23.10.
  95. hebasto merged this on Jul 30, 2024
  96. hebasto closed this on Jul 30, 2024

  97. RandyMcMillan commented at 12:08 pm on August 16, 2024: contributor
    thanks!

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-22 03:20 UTC

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