Skip to content
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

Remove deprecated API usage #128872

Open
flash1293 opened this issue Mar 30, 2022 · 2 comments
Open

Remove deprecated API usage #128872

flash1293 opened this issue Mar 30, 2022 · 2 comments
Labels
blocked impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture

Comments

@flash1293
Copy link
Contributor

flash1293 commented Mar 30, 2022

There are a few deprecated APIs in use in VisEditors plugins which should be fixed.

onAppLeave in lens / visualizations

Instead of onAppLeave, the block method of the history object passed down to the mount function of the app should be used (

mount: async (params: AppMountParameters) => {
).

It's a thin wrapper around the block method of the history object used for routing: https://github.com/remix-run/history/blob/3e9dab413f4eda8d6bce565388c5ddb7aeff9f7e/docs/blocking-transitions.md

It seems like the easiest way to implement this is to introduce a shimming layer which keeps the onAppLeave semantics and uses history.block under the hood:

migration warning in lens (done)

Should use warn instead

injectedMetadata in vega (done)

Should have an optional dependency on the maps_ems plugin and get it from there via contract

@flash1293 flash1293 added technical debt Improvement of the software architecture and operational architecture Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 30, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293
Copy link
Contributor Author

Getting rid of onAppLeave is blocked on #132597, #132599 and #132600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

4 participants