Skip to content

fix: satisfy CSSProperties type for hello-pangea/dnd draggable style#247

Merged
NesiciCoding merged 1 commit into
mainfrom
claude/quizzical-maxwell-3e37bd
Jul 2, 2026
Merged

fix: satisfy CSSProperties type for hello-pangea/dnd draggable style#247
NesiciCoding merged 1 commit into
mainfrom
claude/quizzical-maxwell-3e37bd

Conversation

@NesiciCoding

@NesiciCoding NesiciCoding commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • @radix-ui/react-dialog@1.1.17 (introduced in Dependabot PR chore(deps): bump the react-ecosystem group across 1 directory with 3 updates #166) augments React.CSSProperties with a --radix-${string} index signature
  • @hello-pangea/dnd's DraggingStyle type does not declare that index signature, so spreading draggableProps directly onto a <div> broke tsc
  • Fix: explicitly cast draggableProps.style to React.CSSProperties at the two spread sites in TestBuilderPage.tsx — same pattern already used in RubricBuilder.tsx

What a reviewer should know

This fix was developed alongside PR #166 (the Dependabot react-ecosystem bump). The same change was pushed directly to that branch so #166's CI could go green; this PR lands the fix on main so it persists independently of Dependabot rebase cycles.

No runtime behaviour changes — cast only affects TypeScript compilation.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved drag-and-drop behavior in the test builder by ensuring draggable question items keep the correct styling while being moved.
    • Fixed issues that could affect item positioning in both uncategorized questions and section-based question lists.

@radix-ui/react-dialog 1.1.17 augments React.CSSProperties with a
--radix-${string} index signature that DraggingStyle from
@hello-pangea/dnd does not declare, breaking tsc. Cast draggableProps
style to React.CSSProperties at the two spread sites in TestBuilderPage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2fadb658-eaf7-4711-bacf-0b48f6e3db95

📥 Commits

Reviewing files that changed from the base of the PR and between a5f89a3 and f1571cd.

📒 Files selected for processing (1)
  • src/pages/TestBuilderPage.tsx

📝 Walkthrough

Walkthrough

The TestBuilderPage component now explicitly sets the style prop on draggable QuestionEditor wrapper <div> elements from draggable.draggableProps.style, cast to React.CSSProperties, in both the uncategorised questions list and section questions lists.

Changes

Draggable Style Assignment

Layer / File(s) Summary
Explicit style prop on draggable wrappers
src/pages/TestBuilderPage.tsx
Both the uncategorised and section-level draggable question item wrappers now explicitly assign style from draggable.draggableProps.style, cast to React.CSSProperties, instead of relying solely on the spread draggableProps.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Poem

A hop, a drag, a style applied,
No more shall wrappers be denied,
With CSSProperties cast just right,
Questions glide with smoother flight,
🐰 Thump-thump — the code's aligned!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing the hello-pangea/dnd draggable style TypeScript mismatch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/quizzical-maxwell-3e37bd

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 71.42% (🎯 65%) 7089 / 9925
🔵 Statements 69.66% (🎯 65%) 8077 / 11594
🔵 Functions 62.91% (🎯 60%) 2529 / 4020
🔵 Branches 61.82% (🎯 58%) 5868 / 9492
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/pages/TestBuilderPage.tsx 45.06% 41.73% 34.78% 47.05% 72, 87-128, 142-166, 171, 220, 235-255, 277-326, 350-414, 447, 482-599
Generated in workflow #714 for commit f1571cd by the Vitest Coverage Report Action

@NesiciCoding NesiciCoding merged commit 745fe4e into main Jul 2, 2026
7 of 8 checks passed
@NesiciCoding NesiciCoding deleted the claude/quizzical-maxwell-3e37bd branch July 2, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant