-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Editor linting docs #2750
base: zamoore/HDS-4361/CodeEditor-linting
Are you sure you want to change the base?
Code Editor linting docs #2750
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
c192a50
to
02e764e
Compare
c1811e4
to
0f49b5b
Compare
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
@@ -104,3 +104,22 @@ In **Figma** we provide a handful of example languages intended as visual exampl | |||
|
|||
If you wish to create custom examples using the Code Editor, we publish all of the relevant syntax highlighting variables in the [HDS Components v2.0](https://www.figma.com/design/iweq3r2Pi8xiJfD9e6lOhF/HDS-Components-v2.0?node-id=67166-37020&t=gWdKy44MzTP4cTRo-1) library. However, due to the number of languages supported by the component, the color variables use a generic naming schema (e.g., cyan, red, purple) to remain as agnostic as possible when being applied to different languages. | |||
For more details around syntax, visit the [specifications](/components/code-editor?tab=specifications). | |||
|
|||
## Linting | |||
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. To view all alerts in the editor, users can open a dialog using Ctrl-Shift-m (Cmd-Shift-m on macOS). |
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.
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. To view all alerts in the editor, users can open a dialog using Ctrl-Shift-m (Cmd-Shift-m on macOS). | |
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. To view all alerts in the editor, open the alert dialog using Ctrl-Shift-m (Cmd-Shift-m on macOS). |
[Nit] Use more active language
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
website/docs/components/code-editor/partials/guidelines/guidelines.md
Outdated
Show resolved
Hide resolved
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.
@LilithJames-HDS I left one suggestion about the copy. We also need to update the old screenshots in the guidelines because the line height has changed.
@@ -104,3 +104,22 @@ In **Figma** we provide a handful of example languages intended as visual exampl | |||
|
|||
If you wish to create custom examples using the Code Editor, we publish all of the relevant syntax highlighting variables in the [HDS Components v2.0](https://www.figma.com/design/iweq3r2Pi8xiJfD9e6lOhF/HDS-Components-v2.0?node-id=67166-37020&t=gWdKy44MzTP4cTRo-1) library. However, due to the number of languages supported by the component, the color variables use a generic naming schema (e.g., cyan, red, purple) to remain as agnostic as possible when being applied to different languages. | |||
For more details around syntax, visit the [specifications](/components/code-editor?tab=specifications). | |||
|
|||
## Linting | |||
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. To view all alerts in the editor, users can open a dialog using Ctrl-Shift-m (Cmd-Shift-m on macOS). |
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.
[suggestion] remove the duplicative content that's also available below with a visual example.
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. To view all alerts in the editor, users can open a dialog using Ctrl-Shift-m (Cmd-Shift-m on macOS). | |
The Code Editor supports linting for JSON using [CodeMirror6](https://codemirror.net/examples/lint/). This feature highlights all errors with an underline and an icon next to the line number. Each icon has a tooltip explaining the error on the associated line. |
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.
Thanks for catching that! I've updated the images and text now
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.
Thanks for the updates @LilithJames-HDS!
Co-authored-by: Dylan Hyun <dylan.hyun@hashicorp.com>
…ines.md Co-authored-by: Dylan Hyun <dylan.hyun@hashicorp.com>
a84f6e6
to
62711d0
Compare
📌 Summary
If merged, this PR will add a section at the end of the Guidelines page for CodeEditor that describes the linting feature available to users only in the JSON language variant of the CodeEditor.
Also adds how-to-use code documentation.
🛠️ Detailed description
Brief description added. Questions for the team:
🔗 External links
Jira ticket: HDS4629
Figma file: Preview of linting