-
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
Link XYChart components to experimental directory #975
Conversation
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.
LGTM, all the demos still load properly. Just one nit-picky comment and don't forget to add a changelog entry.
src/index.js
Outdated
@@ -1,3 +1,4 @@ | |||
export * from './components'; | |||
export * from './services'; | |||
export * from './utils'; | |||
export * from './experimental'; |
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.
Can you re-order this list to be alphabetical order?
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.
Nice work! LGTM.
@@ -313,7 +313,8 @@ export class GuideSection extends Component { | |||
const { code } = this.props.source.find(sourceObject => sourceObject.type === name); | |||
const npmImports = code | |||
.replace(/(from )'(..\/)+src\/components(\/?';)/, `from '@elastic/eui';`) | |||
.replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/services';`); | |||
.replace(/(from )'(..\/)+src\/services(\/?';)/, `from '@elastic/eui/services';`) | |||
.replace(/(from )'(..\/)+src\/experimental(\/?';)/, `from '@elastic/eui/experimental';`); |
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.
❤️
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.
@cjcenizal could you check this? #976 because I'm not really sure if it's better to have /lib/experimental
or /experimental
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.
and maybe it's related to the build
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.
I think the correct path would be eui/lib/experimental
because otherwise someone who copy-pastes the code would have a broken import, right?
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.
I think so, also for services needs to be the same. I will change it and than merge 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.
Thanks, sounds good!
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.
CJ is correct, and the existing @elastic/eui/services
is wrong and should be @elastic/eui/lib/services
This PR comes after a discussion with @cchaos @snide @mattapperson about specifying a bit more that these is a beta/experimental version of the XYChart and that APIs and features can change easily in the feature.
This PR changed the way to import beta XYChart components, forcing developers to import these components from
/experimental
path like:The components are not moved from the
/components
folder, but the exporting module reside in the/src/experimental/index.js
file.The PR also updated the function for rendering example code to correctly handle the experimental components.