-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiCodeBlock] Virtualized option #4952
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
@@ -37,7 +45,7 @@ export const CodeExample = { | |||
<p> | |||
The <strong>EuiCode</strong> and <strong>EuiCodeBlock</strong>{' '} | |||
components support{' '} | |||
<EuiLink external href="https://github.com/wooorm/refractor#syntaxes"> | |||
<EuiLink external href="https://prismjs.com/#supported-languages"> |
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.
No language changes here. Just being consistent on links to prismjs vs. refractor
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
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.
Tested in VO and virtualization works with no issues!
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
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.
The new example LGTM 👍 . I had one question around a particular use-case and a quick comment suggestion.
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
One thing I noticed, is that the virtualized examples all have |
Good catch. It used to work; taking a look. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
flaky test jenkins test this |
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.
👍 Thanks for fixing the copy function.
Preview documentation changes for this PR: https://eui.elastic.co/pr_4952/ |
Summary
Closes #1208 by adding an option to virtualize line rendering using
react-window
.isVirtualized
prop. SettingoverflowHeight
is required with this configuration.overflowHeight
now accepts a percentage value in string form. Consumers need to ensure the parent has calculable height.Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile