refactor(comments): migrate comment menus, onboarding, avatars and task activity helpers to vanilla-extract - #14987
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Bundle Stats —
|
| Metric | Value | vs cody/ve-lite2-02-comments-legacy-0ee6 (0878e79) | vs v6.16.0 |
|---|---|---|---|
| Internal (raw) | 4.46 MB | +222 B, +0.0% | +30.1 KB, +0.7% |
| Internal (gzip) | 1.11 MB | +72 B, +0.0% | +9.7 KB, +0.9% |
| Bundled (raw) | 13.29 MB | -760 B, -0.0% | +28.8 KB, +0.2% |
| Bundled (gzip) | 3.14 MB | -262 B, -0.0% | +8.8 KB, +0.3% |
| Import time | 1.85s | -4ms, -0.2% | +80ms, +4.5% |
bin:sanity
| Metric | Value | vs cody/ve-lite2-02-comments-legacy-0ee6 (0878e79) | vs v6.16.0 |
|---|---|---|---|
| Internal (raw) | 7.1 KB | - | - |
| Internal (gzip) | 2.9 KB | - | - |
| Bundled (raw) | 7.1 KB | - | - |
| Bundled (gzip) | 2.8 KB | - | - |
| Import time | 5ms | +0ms, +0.8% | +0ms, +4.8% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📚 TypeDoc Generation Result✅ TypeDoc generated successfully!
The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully. |
❌ E2E Tests🟢 116 passed • 🔴 14 failed • 🟡 89 flaky • (⚪ 91 skipped) • view full report • view run 🤖 Share with an AI agent: Debug failing tests locallySANITY_E2E_PROJECT_ID=ittbm412 \
SANITY_E2E_BASE_URL=https://e2e-studio-nmy3jbhkg.sanity.dev \
SANITY_E2E_DATASET=pr-14987-chromium-36109500585 \
SANITY_E2E_DATASET_CHROMIUM=pr-14987-chromium-36109500585 \
SANITY_E2E_DATASET_FIREFOX=pr-14987-firefox-36109500585 \
pnpm test:e2e --headed \
e2e/tests/comments/inline.spec.ts \
e2e/tests/default-layout/versionStatus.spec.ts \
e2e/tests/desk/documentTypeListContextMenu.spec.ts \
e2e/tests/document-actions/discardChanges.spec.ts \
e2e/tests/document-actions/delete.spec.ts \
e2e/tests/enhanced-object-dialog/smoke.spec.ts \
e2e/tests/inputs/array.spec.ts \
e2e/tests/presentation/presentation.spec.ts \
e2e/tests/pte/referencesInPopover.spec.ts \
e2e/tests/inputs/text.spec.ts \
e2e/tests/variants/variantTool.spec.ts |
Visual regression coverage59 changed UI files: 14 covered, 0 pending, 45 uncovered. Per-file coverage (59)
covered: a committed |
…sk activity helpers to vanilla-extract Layer 3/10 of the second low-risk cherry-pick series from the styled-components to vanilla-extract migration in #14566. Files are taken from the tip of that stack.
fe477f6 to
30076fd
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both onboarding popovers can lose their animation class when callers provide a class name.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Migrates comment and task UI styling from styled-components to vanilla-extract while preserving existing behavior.
Changes:
- Migrates comment avatars, menus, onboarding popovers, mentions, and origin badges.
- Migrates task footer and activity helper styles.
- Preserves specificity through scoped global styles and doubled selectors.
| File | Description |
|---|---|
TasksFooterOpenTasks.tsx |
Applies the extracted container class. |
TasksFooterOpenTasks.css.ts |
Defines footer badge positioning. |
activity/helpers/index.tsx |
Replaces styled activity helpers. |
activity/helpers/index.css.ts |
Defines activity text and link styles. |
comments/.../CommentsOnboardingPopover.tsx |
Applies extracted onboarding styles. |
comments/.../CommentsOnboardingPopover.css.ts |
Defines sizing and fade-in animation. |
comments/.../CommentsListItemContextMenu.tsx |
Replaces the styled menu card. |
comments/.../CommentsListItemContextMenu.css.ts |
Hides empty menu cards with sufficient specificity. |
comments/.../CommentsAvatar.tsx |
Applies and merges the avatar class. |
comments/.../CommentsAvatar.css.ts |
Overrides the avatar ellipse stroke. |
comments-v2/.../CommentsOnboardingPopover.tsx |
Applies extracted v2 onboarding styles. |
comments-v2/.../CommentsOnboardingPopover.css.ts |
Defines v2 sizing and fade-in animation. |
comments-v2/.../MentionsMenu.tsx |
Replaces styled mentions wrappers. |
comments-v2/.../MentionsMenu.css.ts |
Defines mentions menu size constraints. |
comments-v2/.../CommentsListItemContextMenu.tsx |
Replaces the v2 styled menu card. |
comments-v2/.../CommentsListItemContextMenu.css.ts |
Hides empty v2 menu cards. |
comments-v2/.../CommentOriginBadge.tsx |
Applies the extracted icon-slot class. |
comments-v2/.../CommentOriginBadge.css.ts |
Defines layout and origin colors. |
comments-v2/.../CommentsAvatar.tsx |
Applies and merges the v2 avatar class. |
comments-v2/.../CommentsAvatar.css.ts |
Overrides the v2 avatar ellipse stroke. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Description
Layer 3/10 of a second low-risk cherry-pick stack from the styled-components to vanilla-extract migration in #14566 (the 12-PR
ve-stackseries, #14616 to #14627). The first stack (#14905 to #14914) took the purely static rules and has merged; this one takes the lowest-risk tier that is left, in the same shape: at most 20 files per layer, one commit each, every file copied verbatim from the reference tip, whose merge base withmainis455717e. On top of static rules and&&overrides, this tier allows attribute and pseudo selectors,keyframes,globalStylescoped under a local class, closed-setstyleVariants, a few prop- or theme-driven values (createVarwithassignInlineVars, oruseTheme_v2) and a few media or container queries with default-theme literal breakpoints. Layers are ordered by risk, lowest first, so the stack can be merged bottom-up and stopped at any layer. Based on #14986.This layer covers comment context menus, onboarding popovers, origin badges and avatars in both comment trees, plus two task activity helpers.
What to review
CommentsAvatar(both trees): thesvg > ellipserule moves to aglobalStyleunder the avatar class. At (0,1,2) it outranks v4Avatar's own static ellipse stroke rules (0,1,0) regardless of stylesheet order, as the original did.CommentsListItemContextMenu(both trees) uses&&:emptybecause the original&:emptytiedCard's&:not([hidden])display rule at (0,2,0) and won by order.CommentsOnboardingPopovermoves its fade-in to vanilla-extractkeyframes; the task activity link rule is a doubled-classglobalStyle, andNoWrapstays an exported wrapper.tasks/.../helpers/index.tsxalso carries feat(core): read every selected variant from perspective #14918 (read every selected variant), whichmainadded in a separate hunk; the rebase kept both.sanity(core/comments,core/comments-v2,core/tasks).Testing
Each layer passes
oxfmt --checkand a type-awareoxlint --type-checkof its files plus every file importing them, on its own commit. At the stack tippnpm check:oxlintpasses, the packages build with the migrated rules inlib/bundle.css, andpnpm vitest run --project=sanity --changed origin/mainpasses (227 files, 1885 tests, rebased onmainat4cebde0), as does the exports snapshot test, so no public export changes shape. Every Storybook story that renders a file from this stack (17 stories) was screenshotted onmainand at the tip and compared pixel by pixel: all 17 are identical, while a one-value negative control produced 42,739 changed pixels. For this layer, the CommentOriginBadge and comments-v2 MentionsMenu stories are pixel-identical.Notes for release
N/A – Internal styling migration.