Enable word wrap and indent wrapping for Monaco editors - #27
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves readability of long lines in the app’s Monaco editor instances by enabling word wrapping and indent-preserving wrapped lines across the core JSON/code editor components.
Changes:
- Enable
wordWrap: 'on'for Monaco editors used in JSON/code editing. - Enable
wrappingIndent: 'indent'so wrapped lines preserve indentation context. - Apply the same wrapping behavior to the diff view (
DiffEditor) used in JSON tabs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/form/JsonCodeEditor.tsx | Enables word wrap + indent wrapping in the reusable JSON editor options. |
| src/components/form/FormJsonTabs.tsx | Enables word wrap + indent wrapping in the JSON diff modal’s DiffEditor options. |
| src/components/form/Editor.tsx | Enables word wrap + indent wrapping in the form-bound Monaco editor defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
49
to
+51
| automaticLayout: true, | ||
| wordWrap: 'on', | ||
| wrappingIndent: 'indent', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
wordWrap: 'on'andwrappingIndent: 'indent'in Monaco editor options insrc/components/form/Editor.tsx,src/components/form/FormJsonTabs.tsx(DiffEditor), andsrc/components/form/JsonCodeEditor.tsx.Testing
yarn test,yarn lint, andyarn build, and they completed successfully.Codex Task