Skip to content

feat: show mode-appropriate fields on channel detail and edit pages #48

Description

@pskillen

Problem

#11 added channel CRUD with list, detail, and edit pages, but most fields are visible regardless of mode. The edit form partially gates fields today (isAnalogue → tones, isDigital → DMR block), yet many RF fields and the detail page still show everything — including a permanent DMR section and analogue tone rows on digital channels.

#45 will extend ChannelMode beyond analogue / digital / other (FM, AM, SSB-USB, SSB-LSB, DMR, YSF, Tetra, …). Without a documented field→mode matrix and consistent UI gating, each new mode will require ad-hoc conditionals.

Intended outcome

Documentation

Document which channel fields apply to which modes. Extend (or companion to) docs/reference/channel-modes.md from #45 with a field applicability table, e.g.:

Field / section FM AM SSB DMR YSF Tetra
RX/TX tone
Colour code
Contact / TG list

Include shared fields (frequencies, bandwidth, power, squelch, location, scan/APRS) and mode-specific ones. Implementation helper (src/lib/channelFieldVisibility.ts or similar) should mirror this doc.

Channel edit page

  • Show only fields applicable to the selected mode.
  • Hide empty sections entirely (no "DMR" block on an FM channel).
  • When mode changes, decide whether to clear now-irrelevant values or preserve them silently for mode switches back (document the choice).

Channel detail page

  • Same gating: omit sections/rows that do not apply to the channel's mode.
  • Today detail.tsx always renders RF tones and a full DMR section regardless of channel.mode.

Affected

Notes / dependencies

Out of scope

Workflow note

Branch from origin/main, atomic conventional commits, PR linking Closes #.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions