Skip to content

feat: network switcher, breadcrumbs, version badge, and table row hover effects#568

Merged
Wilfred007 merged 1 commit intoGildado:mainfrom
davedumto:feat/ui-enhancements
Mar 30, 2026
Merged

feat: network switcher, breadcrumbs, version badge, and table row hover effects#568
Wilfred007 merged 1 commit intoGildado:mainfrom
davedumto:feat/ui-enhancements

Conversation

@davedumto
Copy link
Copy Markdown
Contributor

@davedumto davedumto commented Mar 30, 2026

Summary

This PR resolves four frontend UI enhancement issues:

  • Network Switcher (#170: Add 'Network Switcher' Support in UI #387) — A NetworkSwitcher component (select dropdown) lets developers toggle between Testnet and Mainnet directly from the header in both AppLayout and EmployerLayout. Network preference is persisted via a Zustand store (payd-network localStorage key) and defaults to the PUBLIC_STELLAR_NETWORK env var. The footer's network indicator (dot + label) is now dynamic and reflects the active selection.

  • Breadcrumbs (#112: Implement Breadcrumbs for Nested Pages #370) — A Breadcrumb component uses useLocation to build a Home > Section > Page trail for all nested routes. It is excluded from /login and /auth-callback. Integrated into AppLayout's main content area and EmployerLayout's top-bar (replacing the static "Employer dashboard" subtitle).

  • Version Badge in Footer (#125: Add Version Badge to Footer #396) — The footer in AppLayout now displays a version badge (PUBLIC_APP_VERSION env var, fallback 0.0.1) and a colour-coded environment badge (import.meta.env.MODEproduction / staging / dev). Both badges have aria-label attributes for accessibility.

  • Table Row Hover Effects (#113: Add Hover Effects to Table Rows #372) — Employee table rows in EmployeeList now have hover:bg-white/5 and transition-colors for clear row tracking on hover.

New files

File Purpose
src/components/Breadcrumb.tsx Breadcrumb nav component
src/components/NetworkSwitcher.tsx Network toggle UI component
src/stores/networkStore.ts Zustand persist store for network preference
src/components/__tests__/Breadcrumb.test.tsx 10 tests (pure-function + render)
src/components/__tests__/NetworkSwitcher.test.tsx 6 tests
src/components/__tests__/AppLayoutFooter.test.tsx 4 tests (version badge, env badge, network indicator)
src/components/__tests__/EmployeeListHover.test.tsx 2 tests

22 new passing tests added. No regressions introduced.

Test plan

  • Run npm test in frontend/ — all new tests pass, pre-existing suite unchanged
  • Visit /employer/payroll — breadcrumb shows Home > Employer > Payroll
  • Visit /settings — breadcrumb shows Home > Settings
  • Switch network in header dropdown — footer dot and label update accordingly
  • Hover over employee table rows — subtle background highlight appears
  • Footer shows version badge (v0.0.1) and environment badge (dev in development)

closes #387
closes #396
closes #372
closes #370

… hover effects

Resolves four frontend UI enhancement issues:

- feat(network-switcher): add Stellar network toggle (Testnet/Mainnet) to
  AppLayout and EmployerLayout headers; backed by a Zustand persist store
  (payd-network key) that defaults to PUBLIC_STELLAR_NETWORK env var.
  Footer dot and label now reflect the active network dynamically.

- feat(breadcrumbs): add Breadcrumb component using react-router useLocation;
  renders a Home > Section > Page trail for all nested routes; excluded from
  /login and /auth-callback; integrated into AppLayout main area and
  EmployerLayout top-bar (replaces static "Employer dashboard" subtitle).

- feat(footer-badge): add version badge (PUBLIC_APP_VERSION, fallback 0.0.1)
  and environment badge (import.meta.env.MODE -> production/staging/dev) to
  AppLayout footer; badges are colour-coded and accessible via aria-label.

- feat(table-hover): add hover:bg-white/5 and transition-colors to employee
  table rows in EmployeeList for improved row-tracking UX.

Tests: 22 new passing tests across Breadcrumb, NetworkSwitcher,
AppLayoutFooter, and EmployeeListHover suites.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@davedumto Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Wilfred007 Wilfred007 merged commit cd70bbc into Gildado:main Mar 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants