-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[WIKI-826] chore: add unique id as key to logo selector #8494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughTwo files in the callout extension were modified: a key prop was added to CalloutBlockLogoSelector for stable element reconciliation, and the EmojiPicker's closeOnSelect behavior was changed to automatically dismiss after selection. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx,mts,cts}📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx,json,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (2)
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 |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR optimizes React component rendering by adding a unique id as a key to the CalloutBlockLogoSelector component and improves the emoji picker's UX by closing it automatically after emoji/icon selection.
- Added a unique
keyprop based on node ID to prevent unnecessary re-renders of the logo selector component - Changed
closeOnSelectfromfalsetotruefor better emoji picker user experience
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/editor/src/core/extensions/callout/block.tsx | Added unique key prop to CalloutBlockLogoSelector using the node's id attribute for better React rendering optimization |
| packages/editor/src/core/extensions/callout/logo-selector.tsx | Changed closeOnSelect to true to automatically close the emoji picker after selection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }} | ||
| > | ||
| <CalloutBlockLogoSelector | ||
| key={node.attrs["id"]} |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type definition for CustomCalloutNodeViewProps restricts node.attrs to TCalloutBlockAttributes, which doesn't include the "id" attribute. While the UniqueID extension adds an "id" attribute to all callout nodes at runtime, TypeScript doesn't know about this relationship. This creates a type safety issue where node.attrs["id"] is being accessed without proper type support.
Consider extending TCalloutBlockAttributes to include the id field, or updating the type definition to allow for the dynamically added "id" attribute from the UniqueID extension.
Description
this PR is optimizing React component rendering and improving the emoji picker’s behavior.
Type of Change
Screenshots and Media (if applicable)
Screen.Recording.2026-01-06.at.8.08.51.PM.mov
Test Scenarios
References
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.