The development workflow for building a WEM project differs from that of building widgets. When developing a WEM project, you follow a cycle of developing, testing in preview, staging, and finally publishing it to live. This process is repeated whenever there is a new feature to implement or a bug to fix. In contrast, when building widgets, you have a development and testing stage, but once the widget is made available to the public, every change—whether it’s a bug fix or a new feature—is done live. While this approach is not uncommon, it requires caution.
When you create a new widget, its status is "in development." This status will appear as a prefix at the end of the widget name, for example, "My Widget (in Development)." During this stage, the widget can be developed and tested in preview.
If you attempt to view this widget in a staging or live environment, an error will indicate that the widget is not available.
Once you are absolutely sure that the widget is complete, you can make it available. To do this, right-click on the widget in the tree to open the context menu, and select the option "Make Available." A message box will pop up to confirm your decision.
If you publish to staging or live now, you will see that the widget is displayed.
Once a widget is available, every portal that uses this widget will be published with the latest version. This can make updating the widget challenging. Non-breaking changes, such as bug fixes, are generally manageable. However, implementing new features can be difficult. In such cases, it may be wise to create a new widget.
If a significant update is needed for a publicly available widget, I recommend making a copy of the widget by exporting it and then importing it with a new name. You can then develop and test this new widget. Once it is finished, you can carefully update the original widget.
Once a widget is available to the public, it can be flagged as deprecated if necessary. You can deprecate a widget by right-clicking on its name in the left tree view to open the context menu and selecting the "Deprecate" option.
The already published portals that are using this widget are not immediately affected by its deprecation. However, if a portal is published using a deprecated widget, it will display an error message indicating that the widget is not available.