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

Chore: Only load on canvas #24247

Merged
merged 3 commits into from
Oct 22, 2018
Merged

Conversation

w33ble
Copy link
Contributor

@w33ble w33ble commented Oct 18, 2018

Closes #23379

Defer loading Canvas code until the application is used.

  • Wait to load the window error override
  • Only create socket when the app is ready

Since we need to support deferring loading the application until some async things finish (mostly fetching functions), I opted to handle this in the App component, since it was a convenient async way to hold until ready. I figure we can refactor that later.

@w33ble w33ble added v7.0.0 v6.5.0 Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Oct 18, 2018
@w33ble w33ble force-pushed the chore/only-load-on-canvas branch 2 times, most recently from 88369ca to 961bac5 Compare October 18, 2018 21:19
@w33ble w33ble requested a review from rashidkpc October 18, 2018 21:23
@w33ble w33ble added the review label Oct 18, 2018
@w33ble w33ble changed the title [WIP] Chore: Only load on canvas Chore: Only load on canvas Oct 18, 2018
Copy link
Contributor

@rashidkpc rashidkpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego
Copy link
Member

legrego commented Oct 22, 2018

@w33ble Now that the socket isn't being automatically initialized on import, what do you think about having canvas use it's basePath app variable to construct the socket path?

This would let us close #24170, which means that the notion of Canvas's socket doesn't have to leak into OSS

@w33ble
Copy link
Contributor Author

w33ble commented Oct 22, 2018

the notion of Canvas's socket

@legrego I thought the point was that it's not going to be Canvas' socket, it'll be Kibana's, and any app can use it. Even if Canvas is all that creates and uses it now, we might as well plan for the future.

We can do that for now, but we shouldn't close #24170, we still need a way for other plugins to reliably determine the socket's path.

@legrego
Copy link
Member

legrego commented Oct 22, 2018

Yeah long term I think it makes sense to move the socket into Kibana. I'd rather have the platform team drive that though, so if it's easy enough to have Canvas take care of this for now, then that'd be my preference.

@w33ble w33ble merged commit 13ab4cd into elastic:master Oct 22, 2018
@w33ble
Copy link
Contributor Author

w33ble commented Oct 22, 2018

6.x 3fe2b2f

w33ble added a commit that referenced this pull request Oct 22, 2018
Closes #23379

Defer loading Canvas code until the application is used.

- Wait to load the window error override
- Only create socket when the app is ready

Since we need to support deferring loading the application until some async things finish (mostly fetching functions), I opted to handle this in the App component, since it was a convenient async way to hold until ready. I figure we can refactor that later.
@w33ble w33ble deleted the chore/only-load-on-canvas branch October 24, 2018 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v6.5.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants