Skip to content

Show section icons in page headers across all pages - #339

Merged
jinglemansweep merged 1 commit into
mainfrom
feat/page-header-icons
Jul 24, 2026
Merged

Show section icons in page headers across all pages#339
jinglemansweep merged 1 commit into
mainfrom
feat/page-header-icons

Conversation

@jinglemansweep

Copy link
Copy Markdown
Contributor

Summary

Adds the appropriate section icon before the page name in every page header, standardizing what was previously only done for Channels and Routes (via an ad-hoc <span> wrapper stuffed into the title prop).

Changes

  • PageHeader gained a typed icon?: ComponentType prop that renders the section icon at h-8 w-8 inside the <h1>, replacing the duplicated span hack.
  • 10 list pages now pass their section icon: Dashboard, Nodes, Messages, Advertisements, Packets, Map, Members, Profile, Channels, Routes.
  • 3 detail pages got header icons: PacketDetail & PacketGroupDetail gain a new <h1> (with IconPackets), and NodeDetail prefixes its title with IconNodes alongside the existing node-type emoji.
  • i18n normalized — Channels/Routes now use t("entities.channels")/t("entities.routes") (title + usePageTitle), matching every other page. Added the missing entities.channels: "Kanalen" key to nl.json. Visible text is unchanged.
  • TestsPageHeader.test.tsx covers the icon contract (renders/omits); every affected page test (13 files) asserts its heading contains the section <svg>.

Verification

  • npx tsc --noEmit — clean
  • npx vitest run — 337/337 passing
  • pre-commit run --all-files — all green

No new dependencies, no backend/router changes.

Add a typed icon prop to PageHeader that renders the section icon at
h-8 w-8 inside the heading, replacing the ad-hoc span wrapper used by
Channels and Routes. Migrate all 10 list pages to pass their section
icon, and add section icons to the 3 detail page headers (PacketDetail,
PacketGroupDetail, NodeDetail).

Normalize Channels/Routes title keys to the entities.* namespace
(used everywhere else) and add the missing entities.channels key to
nl.json ('Kanalen'). Visible text is unchanged.

Update PageHeader tests for the icon contract and add a focused icon
assertion to each affected page test.
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@jinglemansweep
jinglemansweep merged commit d13695e into main Jul 24, 2026
5 checks passed
@jinglemansweep
jinglemansweep deleted the feat/page-header-icons branch July 24, 2026 22:11
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.

1 participant