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

UI: New JSON viewer #4541

Merged
merged 5 commits into from
Aug 14, 2018
Merged

UI: New JSON viewer #4541

merged 5 commits into from
Aug 14, 2018

Conversation

DingoEatingFuzz
Copy link
Contributor

Based on CodeMirror and more inline with our other UIs.

One great benefit is it actually looks like JSON.

image

@DingoEatingFuzz DingoEatingFuzz merged commit dafe580 into master Aug 14, 2018
@DingoEatingFuzz DingoEatingFuzz deleted the f-ui-new-json-viewer branch August 14, 2018 00:18
theme: 'nomad',
});
jsonStr: computed('json', function() {
return JSON.stringify(this.get('json'), null, 2);
Copy link
Contributor

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;
Copy link
Contributor

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).

Copy link
Contributor Author

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'],
Copy link
Contributor

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?!)

Copy link
Contributor Author

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.

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.

👍 Looks good - had a couple of questions re: auto-height and theming, but nothing major.

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants