Skip to content

feat(spothub): column-visibility menu + shrinkable width (#4157)#4280

Open
M7HNF-Ian wants to merge 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/4157-spothub-column-visibility
Open

feat(spothub): column-visibility menu + shrinkable width (#4157)#4280
M7HNF-Ian wants to merge 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/4157-spothub-column-visibility

Conversation

@M7HNF-Ian

Copy link
Copy Markdown
Contributor

Closes #4157.

What

  • Right-click the Spot List column header for a checkable menu that
    hides/shows Comment, Spotter, Band, Mode, Source. Time, Freq, and
    DX Call stay always-on. Hidden state persists in AppSettings and
    restores on next SpotHub open.
  • Dialog's setMinimumSize width floor lowered from 680 to 360, so
    the window can be dragged narrower once columns are hidden. The
    other tabs keep their own natural minimums via Qt's layout
    constraints — this only removes the hard-coded override.
  • Band-filter checkboxes switched from an equal-stretch QHBoxLayout
    to a wrapping flow layout, so the checked/unchecked state stays
    legible at narrow widths instead of compressing illegibly.

Test plan

  • Built and ran locally against a live DX cluster feed
  • Hid/showed each toggleable column via the header menu — table
    reflows correctly, last visible column absorbs the freed width
  • Closed and reopened SpotHub — hidden-column state persisted
  • Dialog drags narrower once columns are hidden
  • Band-filter checkboxes stay clearly readable at narrow widths

…sdr#4157)

Right-click the Spot List header to hide/show Comment, Spotter, Band,
Mode, Source (Time/Freq/DX Call stay always-on); state persists via
AppSettings. Also lowers the dialog's hard-coded 680px minimum width
to 360px so it can be dragged narrower once columns are hidden.

Band-filter checkboxes now use a wrapping flow layout instead of an
equal-stretch QHBoxLayout, so the checked state stays legible instead
of compressing to illegibility at narrow widths.
@M7HNF-Ian
M7HNF-Ian requested a review from a team as a code owner July 17, 2026 16:58
@jensenpat

Copy link
Copy Markdown
Collaborator

Holding for next week's release

@jensenpat
jensenpat marked this pull request as draft July 17, 2026 17:30
@jensenpat
jensenpat marked this pull request as ready for review July 19, 2026 04:28

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, self-contained feature — thanks for this, @M7HNF-Ian. The column-visibility menu, the persist/restore loop, and the wrapping band-filter layout all read cleanly and match the surrounding SpotHub style. I checked the parts most likely to bite: BandFilterProxy only overrides filterAcceptsRow, so columns map 1:1 and driving setColumnHidden() with source-column enums is correct; setChecked() is called before the QAction::toggled connect, so restoring the menu state doesn't spurious-save; and the FlowLayout is the canonical Qt example with proper item ownership in the dtor (no leak). The 360px width floor is also safe in practice — the Display tab's fixed-width (90px) toggles already enforce a wider layout minimum, so those tabs can't actually shrink past their content.

One convention item to reconcile, otherwise this looks good to merge.

Would like reconciled before merge (or explicitly waived)

  • Principle V: the 5 new column-visibility settings are flat keys (SpotListColVisible_*); new features are supposed to persist as one nested-JSON object under a single root key. See inline — noting the whole dialog is already flat, so this may be a deliberate consistency call on your/the maintainer's part.

Non-blocking notes

  • Worth a quick manual check that the Display/Settings tabs still look right when dragged toward the new 360px floor (I believe they're protected by their own layout minimums, but eyes-on is cheap).

🤖 aethersdr-agent · cost: $3.4240 · model: claude-opus-4-8

Comment on lines +2016 to +2020
{ SpotTableModel::ColComment, "SpotListColVisible_Comment" },
{ SpotTableModel::ColSpotter, "SpotListColVisible_Spotter" },
{ SpotTableModel::ColBand, "SpotListColVisible_Band" },
{ SpotTableModel::ColMode, "SpotListColVisible_Mode" },
{ SpotTableModel::ColSource, "SpotListColVisible_Source" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Per Principle V (see the PR template checklist and .specify/memory/constitution.md), new features should persist as a single nested-JSON value under one root key rather than adding flat keys — here that's 5 new top-level keys (SpotListColVisible_Comment, _Spotter, …). Something like a single SpotListColumnVisibility key holding {"Comment": true, "Spotter": false, …} would keep the settings surface tidy and match the convention for new persistence.

That said, the entire DxClusterDialog (and the adjacent band-filter code you touched) already uses flat keys, so a lone nested key here would be locally inconsistent. Reasonable to either follow Principle V for the new feature or deliberately match the surrounding flat style — flagging so it's a conscious choice rather than an oversight.

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.

SpotHub filtering and shrink to save a desk space

2 participants