Skip to content

Add Monaco-based EditorBlock component#5

Merged
claudemyburgh merged 1 commit into
mainfrom
feature/editor-block-17028135960956445172
May 10, 2026
Merged

Add Monaco-based EditorBlock component#5
claudemyburgh merged 1 commit into
mainfrom
feature/editor-block-17028135960956445172

Conversation

@claudemyburgh
Copy link
Copy Markdown
Member

Created a new React component EditorBlock at resources/js/components/theme/editor-block.tsx that uses @monaco-editor/react.

Key features:

  • Mirroring CodeBlock: Uses the same styling, variants, and header structure as the existing CodeBlock component.
  • Theme Support: Automatically switches between Monaco's vs-dark and light themes based on the project's useAppearance hook.
  • Full-screen Mode: Integrated toggle that uses the Browser Fullscreen API.
  • Clipboard Integration: Built-in copy-to-clipboard button using the local useClipboard hook.
  • SSR Ready: Implements a mount check to ensure the editor only loads on the client, preventing hydration issues.
  • Configurable: Supports common props like language, readOnly, hideLineNumbers, height, and custom Monaco options.

The component is fully typed and includes usage examples in its header.


PR created automatically by Jules for task 17028135960956445172 started by @claudemyburgh

- Implement `EditorBlock` at `resources/js/components/theme/editor-block.tsx`
- Mirror `CodeBlock` visual style and variants ('default', 'minimal')
- Integrate with `useAppearance` for automatic light/dark theme switching
- Add full-screen toggle using Browser Fullscreen API
- Add copy-to-clipboard functionality using `useClipboard` hook
- Ensure SSR safety with mount check
- Provide TypeScript interfaces and JSDoc documentation

Co-authored-by: claudemyburgh <6057076+claudemyburgh@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@claudemyburgh claudemyburgh merged commit 5687346 into main May 10, 2026
0 of 4 checks passed
@claudemyburgh claudemyburgh deleted the feature/editor-block-17028135960956445172 branch May 15, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant