Open Heenawter opened 6 months ago
Pinging @elastic/kibana-presentation (Team:Presentation)
Marking this as blocked, since it is too high risk to do this until all embeddables have been converted.
@Heenawter Regarding data-shared-item
, it is needed for Kibana reporting screenshot tool, otherwise it gives a timeout error. I faced the timeout error in this issue and it turned out that solution was to add the data-shared-item, so I guess we need it in the new Embeddable framework as well. I added it as part of this PR.
I don't know more details about rest attributes, just wanted to share about data-shared-item. I must admit that it is not straightforward what this attribute is doing. But I guess part of the current issue you created, is to figure out what all these attributes are used for and possibly refactor.
Visualize embeddables need to dispatch a renderComplete
event as well as setting data-render-complete
in order to properly signal all the systems they need to interact with.
Not sure how many other embeddable types need to do this. If it's a wider issue we should also make sure they're dispatching this event on the framework level instead of having to make each embeddable type do it.
Describe the feature: Currently, for all legacy embeddables, we are ending up with duplicated
data-render-complete
attributes - (1) from the embeddable itself (due to the use ofRenderCompleteDispatcher
and/or setting the props manually somewhere in the embeddable code) and (2) from the wrappingPresentationPanel
component:Once every embeddable has been converted to the new React system,
PresentationPanel
should be entirely responsible for handling thedata-render-complete
,data-rendering-count
,data-loading
,data-rendering-error
, anddata-error
attributes. As part of this work, we will need to check that no embeddables are continuing to useRenderCompleteDispatcher
and/or setting these attributes manually - and, we can hopefully removeRenderCompleteDispatcher
entirely once we are done.Open questions: I'm not entirely sure what we want to do with the other
data-*
attributes - for example,data-title
,data-shared-item
,data-shared-items-container
, ... etc. We should dig into exactly what these attributes are used for (if they are used at all) and try to centralize where these things are being set. PerhapsPresentationPanel
, perhaps somewhere else.