Skip to content

fix(#356): fix navigation drawer for mobile view#572

Merged
Wilfred007 merged 4 commits intoGildado:mainfrom
playground-ogazboiz:feature/356-mobile-sidebar
Mar 30, 2026
Merged

fix(#356): fix navigation drawer for mobile view#572
Wilfred007 merged 4 commits intoGildado:mainfrom
playground-ogazboiz:feature/356-mobile-sidebar

Conversation

@ogazboiz
Copy link
Copy Markdown
Contributor

Summary

Three root causes were found and fixed:

Issue Fix
Mobile dropdown was absolute inside a flex item, making it narrower than the viewport Replaced with fixed overlay (role=dialog, aria-modal=true) anchored to var(--header-h)
Dropdown used hardcoded bg-white, breaking dark theme Now uses var(--surface) / var(--border-hi)
Header had px-16 on all viewports, crushing logo + hamburger on phones Changed to px-4 sm:px-8 lg:px-16

Additional UX improvements:

  • Semi-transparent backdrop that closes the drawer on tap (common mobile pattern)
  • Drawer height constrained with max-h + overflow-y-auto so long nav lists stay within the viewport

Test plan

  • On screen < 768 px: hamburger visible, tapping opens full-width themed drawer
  • Tapping backdrop closes drawer
  • Drawer does not overlap main content (fixed overlay, not absolute)
  • Dark and light themes both render correctly
  • All 4 unit tests pass (open/close, backdrop close, aria-modal)

Closes #356

Replace blank table body with animated pulse skeleton rows while data
is loading. Add `isLoading` prop to `EmployeeList` and a separate
`EmployeeSkeletonRow` component that mirrors the column layout of the
real rows using Tailwind's `animate-pulse`.

Adds two new tests:
- skeleton rows are rendered (not employee data) when isLoading=true
- empty-state message appears when not loading and list is empty
Add a reusable InfoTooltip component (ⓘ button, hover/focus activated,
keyboard accessible, themed) and wire it up at every occurrence of the
three key financial terms in the dashboard:

- ORGUSD – explains the org's custom Stellar payroll asset
- Trustline – explains the Stellar trustline concept (requirement, 0.5 XLM reserve)
- Ledger Sequence – explains what a Stellar ledger number is

Locations:
- AdminPanel.tsx: all three "Asset Code" inputs + "Trustline Status" heading
- FeeEstimationPanel.tsx: "Last Ledger" stat row

Adds 5 unit tests covering hover, focus, blur, click, and default label.
Add a dedicated org_audit_log table (migration 027) that records every
change to an organization's name, tenant settings, or issuer account.

Changes:
- backend/src/db/migrations/027_create_org_audit_log.sql
    Append-only table with NO UPDATE / NO DELETE rules, org FK, JSONB
    old_value/new_value snapshots, actor info, and three B-tree indexes.

- backend/src/services/orgAuditService.ts
    OrgAuditService with log() (fire-and-forget safe) and list() (paginated).

- backend/src/controllers/tenantConfigController.ts
    Hook log() into upsert() and remove() — captures old value before the
    write so the diff is always available.

- backend/src/routes/orgAuditRoutes.ts
    GET /api/org-audit — paginated audit trail (EMPLOYER role required).

- backend/src/__tests__/orgAuditService.test.ts
    5 unit tests (mock pool) covering insert params, DB error resilience,
    null config_key, list pagination, and limit capping.
Three root causes addressed:

1. Mobile dropdown was positioned absolute inside a flex item (AppNav)
   causing it to be narrower than the viewport and misaligned.
   → Replaced with a fixed overlay panel (role=dialog, aria-modal=true)
     anchored to var(--header-h), so it always spans the full viewport
     width regardless of the flex ancestor.

2. Mobile dropdown used hardcoded bg-white, breaking the dark theme.
   → Now uses var(--surface) and var(--border-hi) CSS variables.

3. Header had px-16 (64 px) on all viewports, leaving almost no usable
   space for the hamburger and logo on small phones.
   → Changed to px-4 sm:px-8 lg:px-16 (responsive padding).

Also adds a semi-transparent backdrop that closes the drawer on tap,
and constrains the drawer height with overflow-y-auto so long nav lists
stay within the viewport on short screens.

Adds 4 accessibility-focused unit tests (hamburger open/close, backdrop
close, aria-modal attribute).
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@ogazboiz 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 291c9fa 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

Development

Successfully merging this pull request may close these issues.

#104: Fix Sidebar Navigation for Mobile View

2 participants