feat(editor): add inspector UI primitives#3171
feat(editor): add inspector UI primitives#3171joaopcm wants to merge 1 commit intofeat/inspector-hooksfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
commit: |
There was a problem hiding this comment.
2 issues found across 16 files
Confidence score: 3/5
- There is a concrete regression risk in
packages/editor/src/ui/inspector/primitives/toggle-group.tsx: spreading...restafter the internalonClickallows consumers to override selection updates, which can break toggle interaction behavior. - The test issue in
packages/editor/src/ui/inspector/primitives/select.spec.tsxis lower severity, but it weakens confidence because the assertion only checks thatonChangefired rather than validating the selected value. - Score is 3 because the toggle-group handler ordering issue is user-facing (severity 6/10, high confidence), while the test mismatch is a smaller quality gap; this looks fixable without broad architectural risk.
- Pay close attention to
packages/editor/src/ui/inspector/primitives/toggle-group.tsxandpackages/editor/src/ui/inspector/primitives/select.spec.tsx- event handling precedence may break selection state, and the test should assert the actual value to prevent regressions.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/editor/src/ui/inspector/primitives/select.spec.tsx">
<violation number="1" location="packages/editor/src/ui/inspector/primitives/select.spec.tsx:27">
P2: The test name says it verifies the selected value, but the assertion only checks that `onChange` was called. Assert the event value to ensure the behavior under test is actually validated.</violation>
</file>
<file name="packages/editor/src/ui/inspector/primitives/toggle-group.tsx">
<violation number="1" location="packages/editor/src/ui/inspector/primitives/toggle-group.tsx:48">
P2: `...rest` is spread after the internal `onClick`, so consumer-provided `onClick` can override selection updates and break toggle behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
4da5510 to
22701c1
Compare
9aeacc3 to
6cd5d52
Compare
22701c1 to
dea4fe0
Compare
6cd5d52 to
5bd34db
Compare
dea4fe0 to
de2a026
Compare
5bd34db to
f3452c2
Compare
de2a026 to
c02e5b7
Compare
f3452c2 to
61aaa75
Compare
c02e5b7 to
32d162c
Compare
aa5fc4e to
f2fdb81
Compare
33bd0ca to
48849cb
Compare
f2fdb81 to
57a0309
Compare
57a0309 to
f5fdfd0
Compare
f5fdfd0 to
2e87fc2
Compare
2e87fc2 to
8076ac4
Compare
2b74476 to
5f00899
Compare
8076ac4 to
589dd95
Compare
589dd95 to
1764134
Compare
|
Auto-merge enabled (squash) via PR Sentinel. |
Summary
Stacks on #3170
Summary by cubic
Adds 10 inspector UI primitives and a minimal layout-only stylesheet to standardize inspector structure and enable consistent theming.
Label,Text,TextField,Textarea,Select(Root/Item),ToggleGroup(Root/Item),Tooltip(Root/Trigger/Content),IconButton,Button,ColorInput.data-re-inspector-*attrs and CSS vars;Button/IconButtondefault to type="button" (Buttonsupportsdata-variant);Textsupportsdata-size/data-color;TextField/Textareaforward refs (Textareasetsdata-type="textarea");ToggleGroupis controlled and setsdata-active/aria-pressed;ColorInputkeeps color picker and hex input in sync and normalizes hex.@react-email/editor/styles/inspector.css(layout only, no visual design).Written for commit 6ee1074. Summary will update on new commits.