fix(ui): route off-pattern surfaces through the shared kit #474

Merged
nrupard merged 2 commits from fix/MAPPS-407-shared-kit into main 2026-08-05 17:14:33 +02:00
Owner

Implements MAPPS-407 (2026-08-04 mokosh-apps UI audit, F10-F14): route off-pattern buttons, tables, stat cards, and the auth shell through the shared component kit. 14 files.

Reconciled ButtonVariant::Link's hover from underline to hover:opacity-90 to match the shipped raw style, then migrated the 11 button-role link copies in the five audited files (audit_log, contacts x3, knowledge_base, sla x4, time x2) to Button { variant: Link }. Router Link {} navigation and <a href> anchors were left untouched. Four more button-role link controls in src/components/ (the picker "Change" chips and the filter-banner clear) are a distinct padded-chip sub-pattern outside this PR's page scope, tracked in MAPPS-416.

F11 - reports Run button

The hand-rolled Primary button becomes Button { variant: Primary, loading: running(), disabled: !can_run, title: ..., "Run report" }; the manual "Running..." text-swap and aria-disabled are dropped (the Button's loading prop renders the spinner beside a stable label).

F12 - raw tables to shared Table

Migrated four of the five raw tables (reports x3 - the audit undercounted, portal invoice line-items x1) to the shared Table kit. The portal invoice table now scrolls within its card at 375px (the shared Table supplies overflow-x-auto). The fifth, the bespoke weekly timesheet grid in time.rs, needs shared-Table features it does not yet have (colspan state rows, column alignment, a footer row) and is tracked in MAPPS-415.

F13 - KPI cards to StatCard

The three hand-rolled KPI card rows (admin, projects, time) now use StatCard, with the grid set to grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4. Note: StatCard renders a fixed text-content value, so the old per-metric value colors (green billable, yellow on-hold, etc.) are dropped in favor of dashboard-consistent styling (StatCard exposes no value-color prop).

F14 - auth pages to AuthLayout

login.rs and onboarding.rs (app-side) now route through the previously-unused AuthLayout. The two portal auth pages (portal_login, portal_set_password) are deliberately left as-is: AuthLayout stamps the "Mokosh Platform" wordmark, logo, and app version footer, which would leak vendor/app chrome into the client-facing portal. AuthLayout fits the two app pages and is no longer dead, so it is not deleted.

Verification

Diff-reviewed against every shared component's prop struct (no local cargo on this box): all Button/StatCard/Table-family/AuthLayout/TableEmptyRow calls are prop-valid, every new symbol resolves through the components glob re-exports, and no import is orphaned (Card is still used in projects/time/audit_log/reports; removed only from admin). CI runs fmt/clippy(-D warnings)/wasm-build/tests. The login/onboarding form bodies are cosmetically over-indented pending dx fmt (rustfmt does not reformat rsx interiors, so this does not affect the fmt gate).

Follow-ups filed and linked: MAPPS-415 (timesheet grid), MAPPS-416 (component-site link chips).

#MAPPS-407

Implements MAPPS-407 (2026-08-04 mokosh-apps UI audit, F10-F14): route off-pattern buttons, tables, stat cards, and the auth shell through the shared component kit. 14 files. ## F10 - ButtonVariant::Link adoption Reconciled `ButtonVariant::Link`'s hover from `underline` to `hover:opacity-90` to match the shipped raw style, then migrated the 11 button-role link copies in the five audited files (audit_log, contacts x3, knowledge_base, sla x4, time x2) to `Button { variant: Link }`. Router `Link {}` navigation and `<a href>` anchors were left untouched. Four more button-role link controls in `src/components/` (the picker "Change" chips and the filter-banner clear) are a distinct padded-chip sub-pattern outside this PR's page scope, tracked in MAPPS-416. ## F11 - reports Run button The hand-rolled Primary button becomes `Button { variant: Primary, loading: running(), disabled: !can_run, title: ..., "Run report" }`; the manual "Running..." text-swap and `aria-disabled` are dropped (the Button's `loading` prop renders the spinner beside a stable label). ## F12 - raw tables to shared Table Migrated four of the five raw tables (reports x3 - the audit undercounted, portal invoice line-items x1) to the shared `Table` kit. The portal invoice table now scrolls within its card at 375px (the shared Table supplies `overflow-x-auto`). The fifth, the bespoke weekly timesheet grid in time.rs, needs shared-Table features it does not yet have (colspan state rows, column alignment, a footer row) and is tracked in MAPPS-415. ## F13 - KPI cards to StatCard The three hand-rolled KPI card rows (admin, projects, time) now use `StatCard`, with the grid set to `grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4`. Note: StatCard renders a fixed `text-content` value, so the old per-metric value colors (green billable, yellow on-hold, etc.) are dropped in favor of dashboard-consistent styling (StatCard exposes no value-color prop). ## F14 - auth pages to AuthLayout `login.rs` and `onboarding.rs` (app-side) now route through the previously-unused `AuthLayout`. The two portal auth pages (`portal_login`, `portal_set_password`) are deliberately left as-is: `AuthLayout` stamps the "Mokosh Platform" wordmark, logo, and app version footer, which would leak vendor/app chrome into the client-facing portal. `AuthLayout` fits the two app pages and is no longer dead, so it is not deleted. ## Verification Diff-reviewed against every shared component's prop struct (no local cargo on this box): all Button/StatCard/Table-family/AuthLayout/TableEmptyRow calls are prop-valid, every new symbol resolves through the `components` glob re-exports, and no import is orphaned (Card is still used in projects/time/audit_log/reports; removed only from admin). CI runs fmt/clippy(-D warnings)/wasm-build/tests. The login/onboarding form bodies are cosmetically over-indented pending `dx fmt` (rustfmt does not reformat rsx interiors, so this does not affect the fmt gate). Follow-ups filed and linked: MAPPS-415 (timesheet grid), MAPPS-416 (component-site link chips). #MAPPS-407
fix(ui): route off-pattern surfaces through the shared kit
Some checks failed
Check / fmt + clippy + tests (pull_request) Failing after 11s
18ddfd4506
Implements MAPPS-407 (2026-08-04 UI audit F10-F14). Reconciles ButtonVariant::Link to the shipped hover:opacity-90 and migrates the 11 button-role link copies to Button{variant:Link}; replaces the reports Run button with Button{loading,disabled}; migrates four raw tables (reports, portal invoice line-items) to the shared Table so the portal table scrolls in its card at 375px; swaps the admin/projects/time KPI cards to StatCard on the dashboard grid breakpoints; and routes the app-side login/onboarding pages through the previously-dead AuthLayout. The bespoke timesheet grid (MAPPS-415), the four component-site link chips (MAPPS-416), and the two portal auth pages (AuthLayout would leak app branding into the client portal) are deliberately left, the first two tracked as follow-ups.

#MAPPS-407
nrupard scheduled this pull request to auto merge when all checks succeed 2026-08-05 17:12:19 +02:00
style(ui): rustfmt import wrapping in audit_log and knowledge_base
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m30s
Create release / Create release from merged PR (pull_request) Has been skipped
c5c977f229
The added Button/ButtonVariant/ButtonSize symbols shifted rustfmt's canonical wrap for the two components imports; reflow to match cargo fmt --check.

#MAPPS-407
nrupard deleted branch fix/MAPPS-407-shared-kit 2026-08-05 17:14:33 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!474
No description provided.