## Summary - add canonical UI standards under `docs/product/standards/` - add a comprehensive filter audit as source material for future filter standardization work - extend the constitution with incremental UI standards enforcement guidance ## Included - `docs/product/standards/README.md` - `docs/product/standards/filament-table-ux.md` - `docs/product/standards/filament-filter-ux.md` - `docs/product/standards/filament-actions-ux.md` - `docs/product/standards/list-surface-review-checklist.md` - `docs/audits/filter-audit-comprehensive.md` - `.specify/memory/constitution.md` ## Notes - this is documentation and governance work only; no runtime code paths changed - no tests were run because the change is docs-only - the new standards structure separates permanent principles, living standards, rollout audits, and review checklists ## Review Focus - confirm the standards location under `docs/product/standards/` - confirm the constitution principle belongs at the constitutional level - confirm the filter audit should live under `docs/audits/` as reference material Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #153
2.9 KiB
2.9 KiB
List Surface Review Checklist
Use this checklist for every spec or PR that creates or modifies a Filament table/list surface. All items must be satisfied or have a documented exception.
Table Structure
- Columns follow the tier model (Primary / Context / Detail)
- Max ~7 visible columns by default (or density justified)
- Primary identifier is
searchable()andsortable() - Explicit
defaultSort()is defined - Timestamps use
->since()+ tooltip in lists - Null values use
->placeholder('—')consistently - IDs are
toggleable(isToggledHiddenByDefault: true)andcopyable()where useful - Status/enum columns use
badge()viaBadgeCatalog/BadgeRenderer - Pagination profile matches the surface type (see table standard)
Empty State
emptyStateHeading(...)is domain-specificemptyStateDescription(...)explains what the user should do- Exactly 1 primary CTA in
emptyStateActions([...]), RBAC-gated - When non-empty, CTA is in header only (not duplicated)
Filters
- Tier 1–2 resources use the persistence trio
- Status/state filters use enum-backed options
- Soft-deletable resources use standard
TrashedFilterlabels - Date range filters use
indicateUsing() - Filter count is reasonable (2–5 for Tier 1–2, 0–3 for Tier 3)
- Filter labels are clear and consistent with domain vocabulary
Actions
- Inspect affordance exists (clickable rows preferred)
- No lone "View" row action button
- Max 2 visible row actions; rest in "More" group
- Destructive actions use
->requiresConfirmation() - Bulk actions use
BulkActionGroup - All actions are server-side authorized
Persistence & State
- Resource lists (Tier 1–2) persist filters, search, sort in session
- Picker/widget tables do NOT persist state
- Refresh does not destroy user context on critical lists
Performance
- No casual
sortable()/searchable()on relations without query review - No row-by-row counts in hot lists unless optimized
- Eager loading where relation-backed columns are rendered
- Default sort is query-efficient
RBAC / Tenancy
- Cross-tenant/workspace tables provide enough context
- Technical IDs are not more prominent than needed
- Actions/CTAs are capability-gated
- Non-member access is 404, not 403
Responsive
- No unnecessary horizontal overload
- Long text uses
wrap()orlimit()+tooltip() - Long IDs do not break layout
How to Use
- Before submitting a PR that touches a table surface, walk through this checklist.
- Mark items as checked or note the documented exception.
- If you're adding a new resource, this checklist applies from the first implementation.
- Guard tests enforce the most critical items automatically — this checklist catches the rest.