You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a patch request to Ditto in a JSON merge patch format and using a null specifier to request a deletion of a JSON key from the thing, if said thing was already selected in the UI console, it does not get updated right away to reflect this removal. In order to see whether the removal happened, one needs to either refresh the page, or deselect and select the thing in question again.
Considering that adding or modifying things via patch requests results in the selected thing in the UI being updated right away, I suspect this could be a bug.
For example, a patch request with the following body would result in the updated "brewingTemp" being visible right away in the UI for the selected thing, but "brewed-coffees" would also be visible until a page is refreshed, or the thing was deselected and selected again.
I think that is due to the nature of Ditto's Server Sent Event API which the Ditto UI makes use of.
When something is deleted, the SSE will only get a notification like:
{}
What could help is to provide some kind of optional "context" (e.g. with the original Ditto Protocol information) when subscribing to the SSE.
I will look into this ..
…the thing on the UI
* fixed by solving the merge on Ditto server side, selecting all "extraFields" for each change .. that way, the complete updated thing is emitted via the SSE instead only the diff
* as a result, also deleted the "merge" functionality of the UI, also removed no-longer needed "lodash" dependency
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
…the thing on the UI
* fixed by solving the merge on Ditto server side, selecting all "extraFields" for each change .. that way, the complete updated thing is emitted via the SSE instead only the diff
* as a result, also deleted the "merge" functionality of the UI, also removed no-longer needed "lodash" dependency
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
When sending a patch request to Ditto in a JSON merge patch format and using a null specifier to request a deletion of a JSON key from the thing, if said thing was already selected in the UI console, it does not get updated right away to reflect this removal. In order to see whether the removal happened, one needs to either refresh the page, or deselect and select the thing in question again.
Considering that adding or modifying things via patch requests results in the selected thing in the UI being updated right away, I suspect this could be a bug.
For example, a patch request with the following body would result in the updated "brewingTemp" being visible right away in the UI for the selected thing, but "brewed-coffees" would also be visible until a page is refreshed, or the thing was deselected and selected again.
The text was updated successfully, but these errors were encountered: