-
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
visualizations plugin np_ready #57983
Conversation
76d1053
to
bebab07
Compare
…/vis-emeddable # Conflicts: # src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/visualize_embeddable.ts # src/legacy/core_plugins/visualizations/public/np_ready/public/legacy/build_pipeline.ts
…/vis-emeddable # Conflicts: # src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/visualize_embeddable.ts # src/legacy/core_plugins/visualizations/public/saved_visualizations/saved_visualizations.ts
Pinging @elastic/kibana-app-arch (Team:AppArch) |
…/vis-emeddable # Conflicts: # src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/get_index_pattern.ts # src/legacy/core_plugins/visualizations/public/np_ready/public/embeddable/visualize_embeddable.ts
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.
Kibana app changes LGTM, didn't test
@elasticmachine merge upstream |
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.
SASS moves lgtm
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
💚 Build SucceededHistory
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.
Overall looks great.
Added couple questions for my own understanding. Lets address F2F.
"data", | ||
"search" | ||
] | ||
"requiredPlugins": ["data", "search", "expressions", "uiActions"] |
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 there a search
plugin at all?
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.
Not sure :D
This will be fixed during cutover anyway. Bunch of plugins are missing 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.
Can't we remove this one?
...legacy/core_plugins/visualizations/public/np_ready/public/saved_visualizations/_saved_vis.ts
Show resolved
Hide resolved
// TODO: can't import from '../../../../legacy/core_plugins/visualizations/public/' directly, | ||
// because yarn build:types fails after trying to emit type declarations for whole visualizations plugin | ||
// Bunch of errors like this: 'Return type of exported function has or is using private name 'SavedVis'' | ||
import { VISUALIZE_EMBEDDABLE_TYPE } from '../../../../legacy/core_plugins/visualizations/public/np_ready/public/embeddable/constants'; |
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.
// brain pick
What exactly happened 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.
As I understood, there is yarn build:types
which emits d.ts files for core
code.
In compilation included only:
"include": [
"src/core/server/index.ts",
"src/core/public/index.ts",
"typings"
]
This file here - src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx
ends up as a deep dependency of "src/core/public/index.ts"
.
If to import whole visualisation
plugin, the type declaration emitting breaks, because of incompatible for declarations code as a dependency of visualisation
plugin.
The code which causing this error:
'Return type of exported function has or is using private name 'SavedVis''
is code like this:
export function createSavedVisLoader(services: SavedObjectKibanaServicesWithVisualizations) {
const { savedObjectsClient, visualizationTypes } = services;
class SavedObjectLoaderVisualize extends SavedObjectLoader {
....
}
return SavedObjectLoaderVisualize
See that SavedObjectLoaderVisualize
is private, so it can't be emitted in declaration.
This root cause issue should be addressed by: #58243
P.S. spend like half of a day figuring out what is going wrong :D
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.
Wow, thanks for digging into it @Dosant ! This import should definitely not be there, this was an oversight during migration. Saved object save modal shouldn't know anything about the visualize embeddable, this logic should be moved into the specific calls (e.g. by passing in a prop like hideDescription
).
I created an issue for this here: #58479
@joshdover I was under the impression the linter would prevent us from referencing legacy from within the new platform. A quick code search reveals a number of offenders, did something break 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.
Canvas changes look good here 👍
Partially addresses elastic#50897 updates visualizations plugin makes visualizations/saved_visualizations np_ready makes visualizations/embeddable np_ready remove DefaultVisEditor dependency from visualizations import AggConfigs directly instead of ui/public Clean up imports from root. use relative imports Remove bind directive import
Partially addresses #50897 updates visualizations plugin makes visualizations/saved_visualizations np_ready makes visualizations/embeddable np_ready remove DefaultVisEditor dependency from visualizations import AggConfigs directly instead of ui/public Clean up imports from root. use relative imports Remove bind directive import Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Partially addresses #50897
updates visualizations plugin
visualizations/saved_visualizations
np_ready
visualizations/embeddable
np_ready
DefaultVisEditor
dependency fromvisualizations
AggConfigs
directly instead ofui/public
bind
directive importChecklist
Delete any items that are not applicable to this PR.
For maintainers