Skip to content

qt: Toggle banned peers visibility#274

Open
umop wants to merge 2 commits intobitcoinknots:29.x-knotsfrom
umop:toggle-banned-peers-visibility
Open

qt: Toggle banned peers visibility#274
umop wants to merge 2 commits intobitcoinknots:29.x-knotsfrom
umop:toggle-banned-peers-visibility

Conversation

@umop
Copy link
Copy Markdown

@umop umop commented Mar 4, 2026

Closes #185
Adds a Hide / Show button on the banned peer list table which shows / hides banned table if visible. Default is to show. Also persists the state in QSettings.

Also cleaned up some indentation and closing tags in the debugwindow.ui

There don't appear to be existing automated tests for individual Peers tab UI elements or visibility toggles. The existing Qt tests focus on RPC command parsing, wallet operations, and high-level integration testing rather than specific widget interactions.

Manually tested:

  • Ban a peer -> verify section appears with Hide button
  • Click Hide -> verify table collapses, button shows "Show"
  • Click Show -> verify table reappears, button shows "Hide"
  • Close and reopen Node window -> verify state persists
  • Unban all peers → verify section (heading + button + table) disappears
  • Button vertical alignment with "Banned peers" label
  • No impact on other tabs (Info, Console, Graph)
  • No extra spacing when table is hidden
  • Waiting for expiry and created Banned peer remains after expiration. #273 which remains (banned peers remain in list after expiry).

Showing:
image

Hidden:
image

@umop umop changed the title Toggle banned peers visibility qt: Toggle banned peers visibility Mar 9, 2026
Copy link
Copy Markdown
Collaborator

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be a single commit, with a subject like "GUI/Peers: Add button to hide/show ban table" and details after a blank line.

Adds a Hide/Show toggle button next to the "Banned peers" heading that allows users to collapse the ban table while keeping the heading visible. The state persists across sessions via QSettings.
@umop umop force-pushed the toggle-banned-peers-visibility branch from 9226e55 to 7c1a63c Compare March 18, 2026 17:33
Copy link
Copy Markdown
Collaborator

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so close, but the Peers tab without any bans now has an extra padding at the bottom

…r spacing and implemented requested whitespace review fixes.

Wrapped the ban heading and table in a container widget to control visibility and spacing as a unit. This ensures the ban section (including margins) only appears when banned peers exist, preventing excess bottom padding when the list is empty.
@umop
Copy link
Copy Markdown
Author

umop commented Apr 9, 2026

I set the bottom margin to 30 to match the current ui at HEAD. There is still space there, though (there always was), so if we want to match other tab layouts, we can reduce that to a smaller value:

Current and old Peers tab:

image

Console tab:

image

@luke-jr
Copy link
Copy Markdown
Collaborator

luke-jr commented Apr 14, 2026

Before:
Screenshot_20260414_155601
After:
Screenshot_20260414_155718
Before:
Screenshot_20260414_155626
After:
Screenshot_20260414_155816

Margins still very different :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show/Hide Banned Peers (gui)

2 participants