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 / syntax highlighting in secrets editor #2915

Open
tvtr04 opened this issue Dec 23, 2024 · 2 comments
Open

Code editor / syntax highlighting in secrets editor #2915

tvtr04 opened this issue Dec 23, 2024 · 2 comments
Labels
🚀 feature request New feature or request linear This tag is used to sync issues with Infisical's internal project management system.

Comments

@tvtr04
Copy link

tvtr04 commented Dec 23, 2024

Feature description

It would be really cool if user would be able to have some small code editor / IDE in the secrets editor in infisical’s website.
For example, when editing JSON secret:

  • Adding new keys/lines will have auto-indentation (instead of manually adding spaces now).
  • If you don’t close a bracket, the secret editor will highlight in red that you have syntax error.

Why would it be useful?

Some of the secrets are not just plain text, they can be a JSON object, or an XML.
Currently if you want to edit it, you have to copy the secret to an IDE, edit it and than copy back to the infisical’s website.
Having small editing capabilities will allow users to edit secrets more conveniently and it will be a great UX improvement.

Additional context

This change shouldn't be complicated, you just need to replace the editing component in the frontend to a library that supports code editing, for example: react-simple-code-editor (https://www.npmjs.com/package/react-simple-code-editor) or any other package.

@tvtr04 tvtr04 changed the title Code editor / syntax highlighting in secret editor Code editor / syntax highlighting in secrets editor Dec 23, 2024
@maidul98 maidul98 added linear This tag is used to sync issues with Infisical's internal project management system. 🚀 feature request New feature or request labels Dec 23, 2024
@FurquanAnwer
Copy link

Can I work on this ?

@user-64bit
Copy link

Hey @maidul98

I was looking into this issue and got one question.
is it good idea to add toggle between SecretInput(or InfisicalSecretInput) and something like codemirror for JSON support?

I was thinking something like below image. (clicking on JSON icon toggle between SecretInput and <CodeMirror />)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 feature request New feature or request linear This tag is used to sync issues with Infisical's internal project management system.
Projects
None yet
Development

No branches or pull requests

4 participants