Closed Dosant closed 4 years ago
Pinging @elastic/kibana-app-arch (Team:AppArch)
another possible solution would be moving the logic into migration script or (preferably not as we need to move that one to migration script as well) move it into visualizations/legacy/vis_update_state
@ppisljar, just realised that this is not only initial migration issue. updated the description:
Create a new map Go to dashboard, create new dashboard Add this map do dashboard Press back button
And, basically, the same thing is happening when opening older dashboard for the first time
Agreed to try to solve this by removing panels state from the url in view mode
While working on dashboard-to-dashboard drilldown a handful of issues were fixed to improve back button experience. https://github.com/elastic/kibana/issues/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 https://github.com/elastic/kibana/issues/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:
cc @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