fix(ui): route off-pattern surfaces through the shared kit #474
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-407-shared-kit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 fromunderlinetohover:opacity-90to 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) toButton { variant: Link }. RouterLink {}navigation and<a href>anchors were left untouched. Four more button-role link controls insrc/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 andaria-disabledare dropped (the Button'sloadingprop 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
Tablekit. The portal invoice table now scrolls within its card at 375px (the shared Table suppliesoverflow-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 togrid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4. Note: StatCard renders a fixedtext-contentvalue, 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.rsandonboarding.rs(app-side) now route through the previously-unusedAuthLayout. The two portal auth pages (portal_login,portal_set_password) are deliberately left as-is:AuthLayoutstamps the "Mokosh Platform" wordmark, logo, and app version footer, which would leak vendor/app chrome into the client-facing portal.AuthLayoutfits 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
componentsglob 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 pendingdx 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 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