test(editor): cover read-only code-block branch; drop dead justify prop (#275 review F1/F2)
F1: add code-block-view.test.tsx (mirrors the footnote structure harness) asserting the language selector renders only when editor.isEditable, and the copy button is present in both modes. F2: remove the now-dead justify=flex-end on the absolutely-positioned menu Group. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,11 +67,7 @@ export default function CodeBlockView(props: NodeViewProps) {
|
||||
<NodeViewContent as="code" className={`language-${language}`} />
|
||||
</pre>
|
||||
|
||||
<Group
|
||||
justify="flex-end"
|
||||
contentEditable={false}
|
||||
className={classes.menuGroup}
|
||||
>
|
||||
<Group contentEditable={false} className={classes.menuGroup}>
|
||||
{/* In read-only (published) there is no language selector at all —
|
||||
only the copy button. When editable the selector is hidden until
|
||||
the block is hovered/focused (or its dropdown is open) via the
|
||||
|
||||
Reference in New Issue
Block a user