[Drilldowns] Dashboard broken back button if embeddable update input during initial rendering #61596
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Dashboard
Dashboard related features
Feature:Drilldowns
Embeddable panel Drilldowns
While working on dashboard-to-dashboard drilldown a handful of issues were fixed to improve back button experience. #61230. But this particular one stands out.
Reproduce:
logs
sample data[Logs] Web Traffic
dashboardExpected behaviour: navigate back to listing page
Current behaviour (after all fixes from #61230 in master): nothing
If to look into history stack:
Redundant changes are triggered by maps embeddable:
I assume what is happening, is when map embeddable from older kibana version is opened, maps are doing state migrations on a fly and update input during initial rendering.
https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/maps/public/embeddable/map_embeddable.tsx#L190
I am not sure, if there are other cases like this except for maps. Didn't find in dashboards from sample data
Please Note:
If to
Save Dashboard
now and return to it - history button works correctly, because we saved last state which map embeddable expects!This maps behaviour causing other issue: as it updates input multiple time, it will retrigger redundant rerenders for other panels
This is not only migration edge case
The same problem is happening, app adds new fields to embeddable state during it's initial rendering.
Possible solutions:
2. Come up with some magic "all settled" on parent embeddable? start syncing state in dashboard when it emitted?- won't work because issue is actually happening not only during initial rendering3. Magic setTimeout in dashboard before push state into url?- won't work because issue is actually happening not only during initial renderingcc @stacey-gammon @ppisljar @streamich
p.s.: maps are ignoring most of state changes which are coming from embeddable input, so history button almost not working for user actions done in maps. but this seems like separate bug
The text was updated successfully, but these errors were encountered: