[WIKI-570] fix: image alignment for read only editor#7509
Conversation
WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant ParentComponent
participant CustomImageBlock
participant ImageToolbarRoot
participant Editor
ParentComponent->>CustomImageBlock: Passes editor prop
CustomImageBlock->>ImageToolbarRoot: Passes editor prop
ImageToolbarRoot->>Editor: Accesses isEditable
alt Editor is editable
ImageToolbarRoot->>ImageAlignmentAction: Render
else Editor is not editable
ImageToolbarRoot-->>ImageAlignmentAction: Do not render
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)packages/editor/src/core/extensions/custom-image/components/block.tsx (1)Learnt from: SatishGandham packages/editor/src/core/extensions/custom-image/components/toolbar/root.tsx (1)Learnt from: SatishGandham 🔇 Additional comments (6)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
Description
This PR fixes the bug where image alignment options are visible in read only editors.
Type of Change
Summary by CodeRabbit
New Features
Bug Fixes