refactor(reviews): interaction state polish — 5 UX fixes
This commit is contained in:
@@ -17,40 +17,14 @@ record rows reuse ReviewDrawer with status-gated footer.
|
||||
|
||||
---
|
||||
|
||||
## 2. Interaction state pass — reviews page polish
|
||||
## 2. Interaction state pass — reviews page polish ⏳ MR !189 pending
|
||||
|
||||
**What.** One MR covering five small fixes:
|
||||
|
||||
- Records empty state: add description + primary action ("Queue is clear, see
|
||||
/audit for past decisions"). Current `<EmptyState title={t('reviews.empty')} />`
|
||||
is just a heading.
|
||||
- Reject reason inline validation: today `handleReject` does
|
||||
`if (!comment.trim()) return` silently. Button click → nothing happens. Show
|
||||
inline error or set the TextArea into error state.
|
||||
- Drawer empty state (`workflow.schemaDraft.empty`): distinguish "not loaded",
|
||||
"not found" (deleted), "no permission". Today the same blank message covers
|
||||
all three.
|
||||
- Approve action: drawer closes immediately on success. Add a 500ms success
|
||||
state (or toast) so the reviewer gets visual confirmation. Currently feels
|
||||
like the click might not have registered.
|
||||
- Post-bulk-result polish: the `bulkResult` Alert lists business keys but the
|
||||
failed list shows raw `reason` codes (`self_approve_forbidden`,
|
||||
`draft_not_pending`). Map through `extractReviewError` already in the file.
|
||||
|
||||
**Why.** Pass 2 rated state coverage 5/10. These are the visible gaps. Each
|
||||
is 10-30 LOC; the value is interaction confidence.
|
||||
|
||||
**Pros.** All in one place — `reviews.tsx`, `SchemaDraftDrawer.tsx`. Low risk.
|
||||
|
||||
**Cons.** Five different surfaces in one MR means review surface is wider than
|
||||
a single-purpose change. Still worth grouping because they're all "state
|
||||
polish" semantically.
|
||||
|
||||
**Context.** Pass 2 finding. None of these block functionality; they're trust
|
||||
builders. Reject silent fail is the most user-visible — a reviewer clicks the
|
||||
button and nothing happens, then notices the TextArea is empty after a beat.
|
||||
|
||||
**Depends on / blocked by.** Nothing.
|
||||
Closed in [MR !189](https://git.nstart.cloud/2-6/2-6-4/terravault/ordinis/-/merge_requests/189) — all 5 fixes in one MR:
|
||||
1. Records empty state — icon + description + audit link
|
||||
2. Reject reason inline validation — aria-invalid + role=alert
|
||||
3. SchemaDraftDrawer empty state — QueryErrorState для errors + dashed block для no-draft
|
||||
4. Approve/reject success flash — 600ms green/pink band before close
|
||||
5. Bulk failed reasons humanized — extracted `humanizeBulkReason()` lib + 7 unit tests
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user