When updating the interactivity widgets to the new OpenBoard API, the Dice widget was forgotten. This PR fixes this in two commits:
The first commit extends the UBWidgetUpgradeAdaptor. It was initially written to upgrade widgets which have been using the old API to updated versions using the new API. The extension added now can also update a widget already using the new API to a new version.
The second commit applies all the changes necessary for uwb-main based widgets.
The automatic version update makes sure that widgets on already existing documents get automatically updated. The update is performed if
The widget existing in the document has a valid ID and version number.
The widget existing in the document does not use the old API. Using the old API takes us to the already implemented "upgrade" path where an widget is upgraded without version number comparison.
The library contains a widget with the same id as the document widget.
The library widget and the document widget have the same major version number. Different major version numbers might indicate incompatible widgets, where an automatic update could break things.
The library widget has however a newer version number taking into account minor or micro version.
When updating the interactivity widgets to the new OpenBoard API, the
Dice
widget was forgotten. This PR fixes this in two commits:UBWidgetUpgradeAdaptor
. It was initially written to upgrade widgets which have been using the old API to updated versions using the new API. The extension added now can also update a widget already using the new API to a new version.uwb-main
based widgets.The automatic version update makes sure that widgets on already existing documents get automatically updated. The update is performed if
This PR fixes #1020.