Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/workspace-context-counter
hifi-phil 39a5362de8 Add testing to workspace counter examples (#19838)
* update workspace example

* Update readme for workspace counter example

* update workspace counter examples readme

* Update examples workspace counter to include some testing

* Update glob pattern for text examples for windows
2025-08-02 12:36:23 +02:00
..

Workspace Extensions Complete Example

The Workspace Context serves as the central communication hub for all workspace extensions. In this example, the context manages a counter that can be manipulated and displayed by different extension types, showcasing the power of shared state management in workspace extensions.

Extension types included

This complete example includes:

  • Workspace Context - Manages shared counter state and provides communication between extensions
  • Workspace Action - Primary "Increment" button that increases the counter value
  • Workspace Action Menu Item - "Reset Counter" dropdown option that resets the counter to zero
  • Workspace View - Dedicated tab that displays the current counter value
  • Workspace Footer App - Status indicator showing the counter value in the workspace footer

How it works

All extensions communicate through the shared workspace context. When you increment or reset the counter using the actions, the workspace view and footer app automatically update to show the new value, demonstrating reactive state management across workspace extensions.

This pattern shows how workspace extensions can work together to create cohesive functionality within Umbraco workspaces.