fix(editor): real comment authors + overlay menu redesign
Comments showed the author's SLUG — which doubles as their personal scope — instead of their name, because WasmTool passed presenceUser().id where .name already existed. - denormalize authorName/authorEmail onto each comment message + thread at write time, so a comment still reads correctly when its author is offline, renamed, or gone. `author` stays the SLUG: colorFor() and the "is this mine?" ownership checks compare it. Legacy comments fall back. - session-identity keeps the email it was already fetching and discarding. Overlay menu: restyle + reorganise into labelled sections (People / Document / Comments / View) over one shared row shape, so sections can't drift apart again. - comments: four bare icons -> labelled rows (Add comment / Show list with count / Hide pins). The nested expand toggle is gone: the section IS the group, so it was a collapsible inside a collapsible. - presence: facepile of initials -> one row per person with an explicit Follow/Stop. The separate "Following X" banner is deleted; that state now lives on the person's own row, so there is nothing to keep in sync. - SourceChip gains a `muted` tone for known-dark surfaces; its solid variant is untouched for the light project pages that share it. Fixes a regression the redesign introduced: the taller panel (z-50) covered the comment popover (z-40), and since a popover can be opened FROM the menu's thread list, the menu swallowed clicks on the popover it had just spawned — delete was unreachable. Popover now z-[60]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016p9kjdGBdcpwUSjJ3q5xg2
This commit is contained in:
parent
f92266fcee
commit
fc2efeff2c
11 changed files with 387 additions and 178 deletions
|
|
@ -29,10 +29,11 @@ async function bootAs(page: Page, user: string): Promise<void> {
|
|||
intervals: [1000],
|
||||
})
|
||||
.toMatch(TITLE);
|
||||
await openOverlayMenu(page); // the comment bar lives in the overlay menu (0010)
|
||||
await expect(page.getByTestId('comment-bar-toggle')).toBeVisible({ timeout: 30000 });
|
||||
await page.getByTestId('comment-bar-toggle').click();
|
||||
await expect(page.getByTestId('comment-mode-toggle')).toBeVisible();
|
||||
// The comment controls live in the overlay menu's "Comments" section and are
|
||||
// visible as soon as it opens — the nested expand toggle (comment-bar-toggle)
|
||||
// is gone, since the section itself is the group.
|
||||
await openOverlayMenu(page); // the comment controls live in the overlay menu (0010)
|
||||
await expect(page.getByTestId('comment-mode-toggle')).toBeVisible({ timeout: 30000 });
|
||||
}
|
||||
|
||||
/** Comments persist in the room's ydoc — start each run from a clean slate. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue