-
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
[EuiSplitPanel] New component #4539
Conversation
# Conflicts: # src-docs/src/components/guide_section/guide_section.js # src-docs/src/components/guide_section/guide_section_parts/guide_section_example.tsx # src-docs/src/services/playground/playground.js # src-docs/src/views/utility_classes/utility_classes_section.tsx
# Conflicts: # src-docs/src/components/guide_section/guide_section_parts/guide_section_example.tsx # src-docs/src/views/utility_classes/utility_classes_section.tsx
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
@thompsongl & @chandlerprall , Leaving this one in draft mode, but curious your take on the component setup. |
I've often seen this namespace pattern before, but have never written or worked with a project that used it. It seems like the pattern lends itself well to this use case. That is, these components 1) are simply stylistic configurations of existing components, 2) are codependent, 3) are stateless and lack functionality, 4) and can be arbitrarily nested and composed. Also, TypeScript solves one of my former hesitations with the pattern in that we'll get IDE help for what components are available in the So that leaves two questions:
Less concerned about 2, because reading documentation is kind of required regardless. |
Thanks @thompsongl ! I agree with all your points as well especially the TS one where it's really easy to get the right component naming and structure.
It's hard to say no to this because the tech will always be changing and so it'll be hard to stick to old patterns if new and/or better ones emerge. This component is also new and pretty simplistic that if we do get negative feedback we could change it without too much side-effects.
For this particular one, absolutely. I'm not sure what better naming there would be because it's literally about visual and code composition.
|
I think I actually figured out a way to handle it via the |
Opening this up for review now. I think we're pretty happy with the format and we'll see what kind of feedback we get. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
Jenkins, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
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.
Code LGTM. Just a couple small things.
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
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 Chrome, Edge, Firefox and Safari. It looks good! 🎉
Jenkins, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4539/ |
Originally created in #4449 , but was asked to make it an exportable component, all for @snide
EuiSplitPanel is basically just a composed component of an outer and any number of inner EuiPanels with some hard-lined props, but still customizable. This was also an attempt to use a component pattern described in #4486.
Checklist
and playground toggles[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes