You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 643bfac
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: DESIGN.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,35 @@ The interface is flat and has exactly two layers.
50
50
- No helper text under a field. If a field needs explaining, its label says it ("備註(簽核人看得到)"); errors go in a toast.
51
51
- A section title on a page is followed by more space (`gap-6`) than a field label (`gap-2`), so the two never read as the same level.
52
52
53
+
## Lists
54
+
55
+
- Rows are separated by dividers (`border-b`), never framed: no card per row, no border around the list. A row's text lines up with the page's left edge.
56
+
- Row actions follow how many there are:
57
+
58
+
| Actions on a row | Shape |
59
+
|------------------|-------|
60
+
| One or two | Ghost icon buttons, each with a tooltip naming the verb ("編輯", "刪除") |
61
+
| Three or more | One `⋯` button opening a `dropdown-menu`; the destructive action last, after a separator |
62
+
63
+
- A delete button stays muted on the row. Red belongs to the confirmation that follows, not to the trigger.
64
+
- Every action that cannot be undone asks first, in the `confirm-dialog` block. Its confirm button names the verb ("刪除", "撤回"), never "確定".
65
+
66
+
## Status and categories
67
+
68
+
Color means state: something that changes as work moves on. A category (a kind, a tag, a group) never gets a color.
69
+
70
+
| What it is | Badge |
71
+
|------------|-------|
72
+
| Waiting on someone (審核中, 送簽中) |`warning`|
73
+
| Done or accepted (已通過, 已完成) |`success`|
74
+
| Rejected or failed (已拒絕, 失敗) |`destructive`|
75
+
| Open, active, in progress (進行中) |`default`|
76
+
| Closed, inactive, draft (已關閉, 停用, 草稿) |`muted`|
77
+
| A category or tag, not a state |`outline`|
78
+
79
+
- Each app maps its status values to these variants in one place, next to the status labels, and every page reads that map.
80
+
- A status that only applies to some rows shows nothing on the others; do not add a "normal" badge.
81
+
53
82
## Type
54
83
55
84
Two sizes, by role: `text-title` (24px) for page and dialog titles, `text-body` (16px) for everything else. Weight and the muted color carry the rest: section titles `font-semibold`, labels and buttons `font-medium`, secondary text `text-muted-foreground`.
0 commit comments