-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Rename kbn_vislib_vis_types plugin #53536
Rename kbn_vislib_vis_types plugin #53536
Conversation
💔 Build FailedHistory
To update your PR or re-run it, just comment with: |
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.
Maps lgtm!
- code review
- tested Maps app locally
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Looks good to me overall. I didn't see any breakages and the things migrated look good to me. The rest of the stuff currently located in ui/vis
can be moved as a second step.
I would like to rename this plugin to vis_type_vislib
- @timroes is there a specific reason this is called differently than the others that's still valid or is this a leftover?
core: KbnVislibVisTypesCoreSetup, | ||
{ expressions, visualizations, __LEGACY }: KbnVislibVisTypesPluginSetupDependencies | ||
) { | ||
// @ts-ignore |
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.
Is this ignore necessary?
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.
nope, thanks
@@ -81,10 +84,11 @@ const getChartTypes = () => [ | |||
}, | |||
]; | |||
|
|||
export enum ChartModes { |
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.
What's wrong with an enum here?
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 short answer, nothing really.
In elastic-charts we only use object enums because of the bloat the standard ts enums
create. elastic/elastic-charts#266
The regular enum would produce something like
enum Pet1 {
Cat = 'Cat',
Dog = 'Dog',
}
// transpiles to this
var Pet1;
(function (Pet1) {
Pet1["Cat"] = "Cat";
Pet1["Dog"] = "Dog";
})(Pet1 || (Pet1 = {}));
where a much cleaner output is
const Pet2 = Object.freeze({
Cat: 'Cat' as 'Cat',
Dog: 'Dog' as 'Dog',
})
type Pet2 = typeof Pet2.Cat | typeof Pet2.Dog;
// transpiles to this
const Pet2 = Object.freeze({
Cat: 'Cat',
Dog: 'Dog',
});
Using a const enum
would be clearer but they are not yet supported in babel (babel/babel#8741)
Add `kbn_vislib_vis_types` to sass lint Co-Authored-By: Caroline Horn <[email protected]>
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 those 👍
@elasticmachine merge upstream |
Waiting to put in |
* shim of kbn_vislib_vis_types (now vis_type_vislib) * Move vislib into vis_type_vislib plugin * Convert remaining plugin files to typescript * Rename vis to vis_type_vislib
* shim of kbn_vislib_vis_types (now vis_type_vislib) * Move vislib into vis_type_vislib plugin * Convert remaining plugin files to typescript * Rename vis to vis_type_vislib
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Release Note
Renames
kbn_vislib_vis_types
plugin tovis_type_vislib