Skip to content

Commit a77dbb7

Browse files
committed
docs: sync documentation with recent changes
1 parent 79a67d8 commit a77dbb7

File tree

2 files changed

+45
-16
lines changed

2 files changed

+45
-16
lines changed

Notes/Chatroom_Feature_Review.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,10 @@ interface ThreadState {
10231023
4. **`ThreadHeader.tsx`:** ✅ Fixed v1.7.0
10241024
- ~~`text-slate-800`~~`text-base-content`
10251025

1026-
5. **`HoverMenuActions.tsx`:** ❌ Still pending
1027-
- `text-gray-600` on `MdMoreVert` → should be `text-base-content/60`
1028-
- Uses `MdMoreVert` (Material icon) instead of `Lu*` (Lucide) per design system
1026+
5. **`HoverMenuActions.tsx`:** ⚠️ Partially fixed
1027+
- ~~Uses `MdMoreVert` (Material icon)~~`Icons.moreVertical` via Icons registry ✅ v1.9.0
1028+
- ~~Inconsistent icon sizing~~ → Standardized to 18px for all hover action buttons ✅ v1.10.0
1029+
- `text-gray-600` / `border-gray-300` hardcoded colors still pending migration to semantic tokens
10291030

10301031
6. **`MobileLayout.tsx`:** ✅ Fixed v1.7.0
10311032
- ~~`bg-transparent` on buttons~~ → Proper `Button variant="ghost"` with semantic colors
@@ -1159,7 +1160,7 @@ interface ThreadState {
11591160

11601161
| ID | Issue | Location | Impact | Status |
11611162
|----|-------|----------|--------|--------|
1162-
| T1 | **Hardcoded colors break dark mode**`bg-blue-50`, `bg-gray-100`, `text-slate-800`, `text-gray-600`, `border-gray-200` | `MessageCardContext.tsx`, `ChatContainerMobile.tsx`, `ThreadHeader.tsx`, `HoverMenuActions.tsx` | Dark mode unusable for chat | ⚠️ Partially fixed v1.7.0 + v1.8.0: `ThreadHeader`, `ChatContainerMobile`, `SheetHeader`, `SystemNotifyChip`, `QuickReactionMenu` (bg-white→bg-base-100, gray→base-content), `globals.scss` (`.bg-chatBubble-owner` removed). `MessageCardContext` and `HoverMenuActions` still pending. |
1163+
| T1 | **Hardcoded colors break dark mode**`bg-blue-50`, `bg-gray-100`, `text-slate-800`, `text-gray-600`, `border-gray-200` | `MessageCardContext.tsx`, `ChatContainerMobile.tsx`, `ThreadHeader.tsx`, `HoverMenuActions.tsx` | Dark mode unusable for chat | ⚠️ Partially fixed v1.7.0 + v1.8.0 + v1.9.0: `ThreadHeader`, `ChatContainerMobile`, `SheetHeader`, `SystemNotifyChip`, `QuickReactionMenu` (bg-white→bg-base-100, gray→base-content), `globals.scss` (`.bg-chatBubble-owner` removed), `HoverMenuActions` icons migrated to `Icons` registry. `MessageCardContext` hardcoded colors still pending. |
11631164
| T1a | **FK violation for unauthenticated users**`channel_members.member_id` FK violated when anonymous session UUID doesn't exist in `public.users` | `useChannleInitialData.ts` | Runtime crash on chatroom open | ✅ Fixed v1.7.0 |
11641165
| T1b | **Redundant notification toast** — "Notifications enabled!" shown on every message send | `NotificationPromptCard.tsx` | UX annoyance | ✅ Fixed v1.7.0 |
11651166
| T2 | **RLS not fully enabled** — Messages and channels tables have RLS policies commented out in `13-RLS.sql` | `supabase/scripts/13-RLS.sql` | Security concern — all authenticated users can access all messages | ❌ Open |
@@ -1170,7 +1171,7 @@ interface ThreadState {
11701171
| ID | Issue | Location | Impact |
11711172
|----|-------|----------|--------|
11721173
| T4 | **`useChannleInitialData` typo** in filename | `hooks/useChannleInitialData.ts` | Developer confusion |
1173-
| T5 | **Mixed icon libraries**`MdMoreVert` (Material) in `HoverMenuActions.tsx`, should be `LuEllipsisVertical` (Lucide) | `HoverMenuActions.tsx` | Design system inconsistency |
1174+
| T5 | ~~**Mixed icon libraries**`MdMoreVert` (Material) in `HoverMenuActions.tsx`, should be `LuEllipsisVertical` (Lucide)~~ | `HoverMenuActions.tsx` | ✅ Fixed v1.9.0 — migrated to `Icons.moreVertical` via Icons registry |
11741175
| T6 | **Stale `@ts-ignore` comments** — Multiple `@ts-ignore` in stores and hooks | `chatroom.ts`, `channelMessagesStore.ts` | Bypassed type checking |
11751176
| T7 | ~~**Legacy `ChannelProvider`** — Separate context provider in `context/ChannelProvider.tsx` with duplicated settings~~ | ~~`context/ChannelProvider.tsx`~~ | ✅ Fixed v1.8.0 — file deleted, wrapper removed from `ChatContainerMobile.tsx` |
11761177
| T8 | **Debounce in `useChannelInitialData`** — Using lodash debounce with `useCallback(debounce(...), [channelId])` is incorrect (creates new debounce on channelId change) | `hooks/useChannleInitialData.ts` | Potential double-fetch |
@@ -1207,8 +1208,10 @@ interface ThreadState {
12071208
- [x] Replace `FilterBar.tsx` hardcoded chip colors (`text-blue-700`, `text-red-700`) → semantic tokens (`text-info`, `text-error`) — ✅ v1.9.0
12081209
- [x] Replace `Tabs.tsx` `text-indigo-600``text-primary` — ✅ v1.9.0
12091210
- [x] Fix `StyleSelect.tsx` `editor: any``Editor` from `@tiptap/core` with module augmentation for custom commands — ✅ v1.9.0
1211+
- [x] Standardize icon sizing across all chatroom components (hover actions 18px, menu items 18px, toolbar 16px, composer actions 18px, TOC icons 20px) — ✅ v1.10.0
1212+
- [x] Fix `UserReadStatus.tsx` inconsistencies: duplicate classes, `className="size-4"``size={16}`, redundant padding, inconsistent gap — ✅ v1.10.0
1213+
- [x] Migrate `Select.tsx` and `SearchableSelect.tsx` to `Icons` registry + `ScrollArea` component — ✅ v1.10.0
12101214
- [ ] Replace remaining hardcoded colors in message components (`MessageCardContext`, `HoverMenuActions`, etc.)
1211-
- [ ] Replace `MdMoreVert` with `LuEllipsisVertical` in `HoverMenuActions`
12121215
- [ ] Audit all `bg-*` and `text-*` classes against `Design_System_Global_v2.md`
12131216
- [ ] Test dark mode end-to-end for chat feature
12141217

@@ -3190,7 +3193,7 @@ The chatroom feature was built **before** the Design System v3.0 was formalized.
31903193
| Design System Section | Score | Status |
31913194
|---|---|---|
31923195
| §2.1 — Semantic color tokens | **3/10** | 🔴 Critical — 35+ hardcoded color violations |
3193-
| §2.3 — ScrollArea for all scroll | **1/10** | 🔴 CriticalZero ScrollArea usage |
3196+
| §2.3 — ScrollArea for all scroll | **3/10** | 🟡 WarningShared UI (`Select`, `SearchableSelect`) migrated ✅ v1.10.0; chatroom-specific still pending |
31943197
| §3.2 — Radius tokens | **5/10** | 🟡 Warning — Arbitrary radii in 5+ components |
31953198
| §3.5 — Lucide icons only | **10/10** | 🟢 Complete — All chatroom icons migrated to `Icons` registry ✅ v1.9.0 |
31963199
| §5.1 — Button consistency | **7/10** | 🟢 Good — Shared `Button` used in most places |
@@ -3325,18 +3328,22 @@ The design system states: *"Visible focus states (don't remove outline without r
33253328

33263329
---
33273330

3328-
#### 32.2.4 🔴 CRITICALZero ScrollArea Usage (Violates §2.3)
3331+
#### 32.2.4 🟡 WARNINGLimited ScrollArea Usage (Violates §2.3)
33293332

33303333
The design system states: *"If an element can scroll, it must use the shared ScrollArea component"*
33313334

3332-
**Current state: ZERO imports of `ScrollArea` in the chatroom directory**
3335+
**Current state: Shared UI components (`Select`, `SearchableSelect`) migrated to `ScrollArea` (v1.10.0). Chatroom-specific scrollable elements still pending.**
33333336

33343337
Scrollable elements using native scroll:
3335-
- Message feed list (virtual scroll via Tanstack Virtual)
3338+
- Message feed list (virtual scroll via Tanstack Virtual)**valid exception** (same as TipTap editor in §2.3)
33363339
- `QuickReactionMenu` — uses `overflow-x-auto` + `scrollbar-hide` + inline `scrollbarWidth: 'none'`
33373340
- Mention list dropdown — `overflow-y-auto`
33383341

3339-
**Note:** The message feed uses Tanstack Virtual, which requires a native scroll container. This is a valid exception (similar to the TipTap editor exception in §2.3). However, the `QuickReactionMenu` and `MentionList` should use `ScrollArea`.
3342+
**Migrated to `ScrollArea`:**
3343+
- `Select.tsx` dropdown options list — ✅ v1.10.0
3344+
- `SearchableSelect.tsx` dropdown options list — ✅ v1.10.0
3345+
3346+
**Still pending:** `QuickReactionMenu` and `MentionList` should use `ScrollArea`.
33403347

33413348
---
33423349

@@ -3545,7 +3552,7 @@ whileTap={{
35453552
| **MessageSeen** |`gray-400` |`Io*` | N/A | N/A | N/A ||| 2/10 |
35463553
| **ReactionList** || N/A ||| ⚠️ | ⚠️ || 5/10 |
35473554
| **AddReactionButton** ||`Md*` ||| ⚠️ | ⚠️ || 4/10 |
3548-
| **HoverMenuActions** |`gray-600`,`gray-300` | `Md*` |||| ⚠️ || 3/10 |
3555+
| **HoverMenuActions** |`gray-600`,`gray-300` | `Icons` v1.9.0 |||| ⚠️ || 4/10 ⬆️ |
35493556
| **QuickActions** || N/A |`rounded-md` ||| ⚠️ || 5/10 |
35503557
| **ContextMenuItems (desktop)** |`red-500`,`gray-300` |`Md*`,`Bs*` | N/A || N/A | ⚠️ || 2/10 |
35513558
| **ContextMenuItems (mobile)** |`red-500` |`Md*`,`Bs*` | N/A | N/A || ⚠️ || 3/10 |
@@ -3647,10 +3654,12 @@ Three different visual patterns for the same conceptual action. The design syste
36473654
| 2.5 | Replace `Fa*``Lu*` (reply) | 1 | Visual consistency |
36483655
| 2.6 | Replace `Io*``Lu*` (checkmarks) | 1 | Visual consistency |
36493656
| 2.7 | Replace `Cg*``Lu*` (reply) | 1 | Visual consistency |
3650-
| 2.8 | Verify icon sizes match DS (14/16/18/20px) | All | Consistent sizing |
3657+
| 2.8 | ~~Verify icon sizes match DS (14/16/18/20px)~~ ✅ v1.10.0 — All chatroom, composer, toolbar, TOC, and shared UI icons standardized | All | ✅ Done |
36513658

36523659
**Estimated effort: 2 days. Purely visual change. QA with screenshot comparison.**
36533660

3661+
> **v1.10.0 icon sizing audit results:** Hover action buttons → 18px, context/dropdown menu items → 18px, editor toolbar → 16px, composer toolbar → 16px, composer actions → 18px, TOC sidebar → 20px, scroll-to-bottom → 20px, inline status → 16px, tiny inline → 14px. `UserReadStatus.tsx` fixed: `className="size-4"``size={16}`, duplicate classes removed, padding/gap normalized.
3662+
36543663
#### Phase 3 — Radius & Scroll Compliance (1 day)
36553664

36563665
| # | Task | Files | Impact |
@@ -3660,6 +3669,8 @@ Three different visual patterns for the same conceptual action. The design syste
36603669
| 3.3 | Replace `rounded-lg``rounded-field` / `rounded-selector` | ~3 | DS token |
36613670
| 3.4 | Migrate `QuickReactionMenu` scroll to `ScrollArea` | 1 | Scroll consistency |
36623671
| 3.5 | Migrate `MentionList` scroll to `ScrollArea` | 1 | Scroll consistency |
3672+
| 3.6 | ~~Migrate `Select.tsx` dropdown to `ScrollArea`~~ ✅ v1.10.0 | 1 | ✅ Done |
3673+
| 3.7 | ~~Migrate `SearchableSelect.tsx` dropdown to `ScrollArea`~~ ✅ v1.10.0 | 1 | ✅ Done |
36633674

36643675
#### Phase 4 — Accessibility (2-3 days)
36653676

@@ -3709,9 +3720,9 @@ Three different visual patterns for the same conceptual action. The design syste
37093720
| Metric | Before (Current) | After (All Phases) |
37103721
|---|---|---|
37113722
| Hardcoded colors | **35+** | **0** |
3712-
| Non-Lucide icon imports | **28 files** | **0** |
3723+
| Non-Lucide icon imports | **28 files** | **0** (chatroom ✅ v1.9.0, shared UI ✅ v1.10.0) |
37133724
| Focus states | **0** | **All interactive** |
3714-
| ScrollArea usage | **0** | **All scrollable** (except virtual list) |
3725+
| ScrollArea usage | **0** **2** (`Select`, `SearchableSelect` ✅ v1.10.0) | **All scrollable** (except virtual list) |
37153726
| Arbitrary radii | **5+** | **0** |
37163727
| Dark mode violations | **18+ components** | **0** |
37173728
| Touch target violations | **4 components** | **0** |

Notes/Design_System_Global_v2.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docs.plus Design System (Global)
22

3-
> **Version:** 3.5.0
3+
> **Version:** 3.6.0
44
> **Last updated:** 2026-02-17
55
> **Owners:** UI/UX Team
66
@@ -287,8 +287,23 @@ export const Icons = {
287287
| `btn-md` (40px) | 18px | Mobile icon-only buttons, nav actions |
288288
| `btn-lg` (48px) | 20px | Primary mobile CTAs |
289289

290+
**Icon size by UI context (standardized v1.10.0):**
291+
292+
| Context | Icon size | Examples |
293+
|---------|-----------|----------|
294+
| Desktop toolbar buttons | 16px | Editor toolbar (bold, italic, link, image, etc.) |
295+
| Desktop message composer toolbar | 16px | Composer formatting buttons |
296+
| Hover action buttons (chatroom) | 18px | Emoji, reply, thread, bookmark, more actions |
297+
| Menu items with text labels | 18px | Context menu entries, dropdown actions |
298+
| Composer action buttons | 18px | Emoji picker, mention, send, toggle toolbar |
299+
| TOC sidebar icons | 20px | Chat bubble icon on TOC items |
300+
| Scroll-to-bottom / mobile standalone | 20px | `ScrollToBottomButton`, mobile quick reaction "+" |
301+
| Inline status indicators | 16px | Read status checkmarks, message seen |
302+
| Small inline icons | 14px | Add-reaction "+" on reaction pills |
303+
290304
- Colors: inherit from parent or use `text-base-content/60` for muted
291305
- Every icon-only button MUST have a tooltip (§5.12)
306+
- Use the `size` prop, not `className="size-*"` — the prop ensures consistent rendering across icon libraries
292307

293308
---
294309

@@ -407,6 +422,8 @@ Validation states: `input-success`, `input-error`
407422
5. **ARIA**`aria-haspopup="listbox"`, `aria-expanded`, `aria-activedescendant`, `role="option"`, `aria-selected`, unique `id`s.
408423
6. **Panel**`bg-base-100 border-base-300 rounded-box border shadow-lg z-50`.
409424
7. **Options**`px-3 py-2 text-sm`, hover `bg-base-200`, selected `text-primary font-medium` + `Icons.check`.
425+
8. **Icons** — All icons (`chevronDown`, `check`, `search`) use the `Icons` registry (§3.5) — never raw `Lu*` imports.
426+
9. **ScrollArea** — Dropdown option lists use the shared `ScrollArea` component (§2.4) — never raw `overflow-y-auto`.
410427

411428
> ⚠️ **DaisyUI `select` gotcha:** On a `<button>`, the `select` class adds an arrow via `background-image`. Add `bg-none` to remove it and `pr-3` to fix padding. Both components handle this.
412429
@@ -509,6 +526,7 @@ interface SearchableSelectOption {
509526
| Trigger disabled | `select-disabled cursor-not-allowed` |
510527
| Chevron | `Icons.chevronDown` 16px, `rotate-180` when open, `duration-200` |
511528
| Panel | `bg-base-100 border-base-300 rounded-box border shadow-lg z-50` |
529+
| Option list | `ScrollArea` with `maxHeight` prop — never raw `overflow-y-auto` |
512530
| Option | `px-3 py-2 text-sm transition-colors` |
513531
| Option highlighted | `bg-base-200` |
514532
| Option selected | `text-primary font-medium` + `Icons.check` 16px |

0 commit comments

Comments
 (0)