Details
Description
Open UI extensions that run on the same origin can use existing internal APIs to modify the configuration of a channel. When a user discards channel changes (via Channel > Discard changes) those modifications will be discarded too. In that case the extension should refresh it's UI to reflect the old state again. Currently, the client library does not provide an event for this case.
Idea: add the following events to the client library:
- ui.channel.on('discardChanges', eventHandler)
Called when a user discards channel changes - ui.channel.on('publishChanges', eventHandler)
Called when a user publishes channel changes
Note that these events can also happen when an admin publishes or discards changes from other users (via 'Channel > Manage changes').
The 'publishChanges' event is not strictly necessary for the envisioned use case, but seems natural to add too.
To be decided: which data to pass to the event handlers.