Skip to content
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 additional languages #2684

Merged
merged 9 commits into from
Feb 19, 2025
Merged

Conversation

zamoore
Copy link
Contributor

@zamoore zamoore commented Feb 4, 2025

πŸ“Œ Summary

If merged, this PR adds syntax highlighting support for JavaScript and Rego to the hds-code-editor modifier.

πŸ› οΈ Detailed description

  • Implements custom Rego StreamParser
  • Uses official JS parser for javascript

πŸ“Έ Screenshots

πŸ”— External links

Jira tickets:
HDS-4452
HDS-4469


πŸ‘€ Component checklist

πŸ’¬ Please consider using conventional comments when reviewing this PR.

@hashibot-hds hashibot-hds added packages/components docs-website Content updates to the documentation website showcase labels Feb 4, 2025
Copy link

vercel bot commented Feb 4, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Feb 14, 2025 7:54pm
hds-website βœ… Ready (Inspect) Visit Preview Feb 14, 2025 7:54pm

Copy link
Contributor

@shleewhite shleewhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out and looked good to me, just a couple small nits.

packages/components/src/modifiers/hds-code-editor/types.ts Outdated Show resolved Hide resolved
.changeset/smooth-bobcats-hang.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dchyun dchyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a couple small comments

showcase/app/controllers/components/code-editor.js Outdated Show resolved Hide resolved
.changeset/smooth-bobcats-hang.md Outdated Show resolved Hide resolved
@hashicorp hashicorp deleted a comment from Bosaba667 Feb 7, 2025
@hashicorp hashicorp deleted a comment from Bosaba667 Feb 7, 2025
@majedelass
Copy link
Contributor

Design will have to add these to the CodeEditor ~ will open up a branch for this in Figma.

Copy link
Contributor

@jorytindall jorytindall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚒

@zamoore zamoore merged commit dea879f into main Feb 19, 2025
14 checks passed
@zamoore zamoore deleted the code-editor-additional-languages branch February 19, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-website Content updates to the documentation website packages/components showcase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants