-
Notifications
You must be signed in to change notification settings - Fork 2k
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
UI: New JSON viewer #4541
UI: New JSON viewer #4541
Conversation
4b84d41
to
6db90c7
Compare
6db90c7
to
dcd8133
Compare
theme: 'nomad', | ||
}); | ||
jsonStr: computed('json', function() { | ||
return JSON.stringify(this.get('json'), null, 2); |
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.
❤️ that JSON makes pretty-printing so easy - in Vault, we have this as a template helper because we have some places we render object values in the UI that aren't in a code mirror instance (though thinking about it now, maybe they should be 🤔 ).
$dark-bright: lighten($dark, 15%); | ||
|
||
.CodeMirror { | ||
height: auto; |
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.
Does this work by itself? I remember reading something that you'd have to also pass bottom margin Infinity
in the code mirror instantiation if you wanted it to auto-size (just assuming you wanted auto-size from this though).
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.
It works for this context because job definitions always have a value. I ran into the problem I think you are talking about with new job. The empty editor is still only one line tall. I'll look into the bottom margin Infinity
trick.
@@ -12,6 +12,10 @@ module.exports = function(defaults) { | |||
svg: { | |||
paths: ['public/images/icons'], | |||
}, | |||
codemirror: { | |||
themes: ['solarized'], |
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.
Are you using this? I think if you want to, you'd still have to add the vendor CSS to your ember-cli-build.js
file (or is auto-import that smart?!)
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.
Ah whoops. I am not. I'll delete it.
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.
👍 Looks good - had a couple of questions re: auto-height and theming, but nothing major.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Based on CodeMirror and more inline with our other UIs.
One great benefit is it actually looks like JSON.