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

Change KV inputs to textareas, also JSON > CODE #4160

Merged
merged 1 commit into from
Jun 1, 2018

Conversation

johncowen
Copy link
Contributor

Addresses #4138

As the input field was used for KV's it looked like you couldn't save
multiline KV's. Changed to textarea so you can see the multilines.

Also, JSON is slightly misleading as clicking the toggle doesn't
necessarily mean 'I'm going to edit some JSON' it means I want the code
editor with syntax highlighting, so renamed the toggle to say 'Code'

As the input field was used for KV's it looked like you couldn't save
multiline KV's. Changed to textarea so you can see the multilines.

Also, JSON is slightly misleading as clicking the toggle doesn't
necessarily mean 'I'm going to edit some JSON' it means I want the code
editor with syntax highlighting, so renamed the toggle to say 'Code'
@johncowen johncowen requested a review from a team May 28, 2018 16:31
@@ -11,14 +11,14 @@
<div>
<label class="type-toggle">
<input type="checkbox" name="json" checked={{if json 'checked' }} onchange={{action 'change'}} />
<span>JSON</span>
<span>Code</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

It's still JSON mode though, right? Would there be a reason to input anything other than JSON? I guess it's really wide open though isn't it.

Copy link
Contributor Author

@johncowen johncowen Jun 1, 2018

Choose a reason for hiding this comment

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

Yup, the stuff in the KV could be YAML, XML, HCL, TOML, even templates and stuff.

Basically the toggle is to add line numbers and colored syntax highlighting, not 'json editing', I think the best single word for that is just 'Code'. Would be good to think through how we approach some sort of linting for all that in the future. Would be nice to do a 'best guess' and async load the linting code, not sure how successful that would be in reality though, might be too much 'automation', so adding some 'Lint ' buttons/radios might be the way to go.

Copy link
Contributor

@meirish meirish left a comment

Choose a reason for hiding this comment

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

I could go either way on Code or JSON, but big 👍 for the textarea.

@johncowen johncowen merged commit 48b5bd1 into feature/ui-v2-2 Jun 1, 2018
@johncowen johncowen deleted the feature/gh-4138-multline-input branch June 1, 2018 12:22
@johncowen johncowen added the theme/ui Anything related to the UI label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants