-
Notifications
You must be signed in to change notification settings - Fork 11
201 custom component block #214
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🔍 Code Review Summary❗ Attention Required: This push has potential issues. 🚨 Overview
🚨 Critical Issuessecurity (2 issues)1. Potential XSS vulnerability in button content.📁 File: packages/editor/src/components/blocks/ButtonBlock.tsx 💡 Solution: Current Code: {content || 'Button text...'}Suggested Code: {sanitize(content) || 'Button text...'}2. Potential performance hit due to multiple re-renders.📁 File: packages/editor/src/components/editor/BlockFormatToolbar.tsx 💡 Solution: Current Code: export function BlockFormatToolbar({...}){...}Suggested Code: export const BlockFormatToolbar = React.memo(({...}) =>{...});Test Cases19 file need updates to their tests. Run
Useful Commands
|
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.
Consider implementing the following changes to improve the code.
sauravpanda
left a comment
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.
This looks awesome!!
Add Button and Spacer Block Components
Introduce new Button and Spacer block components to enhance the editor's functionality.
ButtonBlockcomponent for customizable buttons with editing capabilities.SpacerBlockcomponent for adjustable vertical spacing between blocks.SortableBlockandBlockRendererto support new block types (button and spacer).BlockFormatToolbarto manage button properties such as URL and style.AIRewriteButtonto include specific rewrite options for button text.These additions improve the editor's usability by allowing users to create and customize buttons and spacers easily.
Original Description
Added spacer and button blocks