Fixed comments UI add details mouse event type#29183
Fixed comments UI add details mouse event type#29183PedroMarianoAlmeida wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis change removes a locally defined Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Why I am making it
This is a focused comments-ui typecheck cleanup.
AddDetailsPopupused a DOMEventtype for anonMouseDownhandler. React passes a React mouse event to that prop, so the handler type was incompatible even though it only needed to stop propagation.What it does
Inlines the stop-propagation callback on the profile modal
onMouseDownprop so TypeScript can infer the correct React mouse event type from JSX.This keeps the existing runtime behavior while avoiding a named one-line handler that has to be manually typed.
Type error fixed
This removes the
apps/comments-ui/src/components/popups/add-details-popup.tsxTS2322error from the comments-uitsc --noEmitcleanup:Why developers need it
This keeps reducing the comments-ui TypeScript error count and lets developers focus on the remaining real type issues in
app.tsxandframe.tsx.Testing
PATH=/Users/pedroalmeida/.nvm/versions/node/v22.13.1/bin:$PATH CI=true pnpm --filter @tryghost/comments-ui exec tsc --noEmitThis still fails on the known remaining comments-ui TypeScript errors, but the
add-details-popup.tsxerror is gone.Checklist