fix(ui): kill style={``}#2834
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughFour components across multiple packages updated to use object-based style syntax instead of template-string style attributes. Changes maintain visual behavior and functionality while aligning style prop construction with SolidJS/JSX conventions. Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/block-md/component/TableInsert.tsx`:
- Around line 90-93: In TableInsert.tsx the inline style object uses cursorPos()
to set left and top but the top value wrongly includes a trailing semicolon
(`top: `${cursorPos().y + 10}px;``) which makes the CSS invalid; update the
style assignment in the component (the object passed to style where cursorPos()
is used) to remove the trailing semicolon so top is set to `${cursorPos().y +
10}px` (leave the left assignment as-is).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f50b3a7d-5921-4007-8bed-03f9a9d73abe
📒 Files selected for processing (4)
js/app/packages/block-md/component/TableInsert.tsxjs/app/packages/core/component/Slider.tsxjs/app/packages/core/internal/PixelArtIconDemo.tsxjs/app/packages/ui/components/BrightJoins.tsx
| style={{ | ||
| left: `${cursorPos().x + 10}px`, | ||
| top: `${cursorPos().y + 10}px;`, | ||
| }} |
There was a problem hiding this comment.
Stray ; in the top value will break tooltip positioning.
With the object-style form, each value is assigned directly to the CSSOM (element.style.top = "…px;"). The trailing ; makes the value an invalid CSS declaration and it will be silently ignored, so top won't apply and the tooltip will sit at the default vertical position instead of tracking the cursor. The ; was harmless in the prior template-string form but must be removed here.
🐛 Proposed fix
style={{
left: `${cursorPos().x + 10}px`,
- top: `${cursorPos().y + 10}px;`,
+ top: `${cursorPos().y + 10}px`,
}}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@js/app/packages/block-md/component/TableInsert.tsx` around lines 90 - 93, In
TableInsert.tsx the inline style object uses cursorPos() to set left and top but
the top value wrongly includes a trailing semicolon (`top: `${cursorPos().y +
10}px;``) which makes the CSS invalid; update the style assignment in the
component (the object passed to style where cursorPos() is used) to remove the
trailing semicolon so top is set to `${cursorPos().y + 10}px` (leave the left
assignment as-is).
No description provided.