enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

Details panel refresh for Version history widget #6093

Closed GlennRicaud closed 6 years ago

GlennRicaud commented 6 years ago
edloidas commented 6 years ago

The problem is a bit more complex than I thought. First of all, it's not a bug only in Version history widget. It displays just the right thing. And the reason it doesn't update widget on deselect & select is due to optimizations because there is no need to fetch the content from the server again.

Second, if you save the content with a different name and then restore the snapshot, the name/path won't change. Or if you delete the content and then try to restore it, it won't appear, unless you reload the grid.

And the main problem is that no server events are generated in response to snapshot restoration. The client simply doesn't know the content was updated. I believe, we just need an implementation of that server events in XP or Data Toolbox app.

GlennRicaud commented 6 years ago

Agreed with the event sent on snapshot restore.

There is already a "backend" event sent on snapshot: "repository.restored" But the websocket of the admin UI does not seem to send it and the Admin apps do not handle it I guess. Not sure how much work it is and if it would have a big impact (you should basically refresh everything).

edloidas commented 6 years ago

Ok, I'll take a look at that event then.

edloidas commented 6 years ago

Issue moved to enonic/lib-admin-ui #383 via ZenHub