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

Use EuiCodeBlock for JSON settings, and overflow if long value #20744

Merged
merged 2 commits into from
Jul 13, 2018

Conversation

jen-huang
Copy link
Contributor

Fixes #20156

In Advanced Settings, change display of JSON default setting value to use EuiCodeBlock, and use its overflowHeight prop for long values. Screenshot shows a long JSON default value and a short JSON value:

screen shot 2018-07-12 at 1 33 31 pm

<EuiCode>
default_value
</EuiCode>
<UNDEFINED>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

UNDEFINED in place of React.Fragment is a bug which is fixed with jest >= v23.0.0. I'm investigating a possible jest upgrade in another branch.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

Code LGTM, just had a question about the language.

<Fragment>
Default:
<EuiCodeBlock
language="js"
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be json instead of js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, for some reason I thought both would highlight the same, but json is a little cleaner. updated.

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

LGTM! Checked code and tested locally.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants