Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/examples/workspace-context-counter
Jacob Overgaard 71057b5f0b Build: Separate eslint logic for **/*.ts files (#19852)
* build: move typescript specific eslint rules to the `**/*ts.` pattern to avoid errors for .js files

* allow `Example` as class prefix

* allow `example-` as custom element prefix

* Removed `eslint-disable-next-line` comments

from the Example classes.

* Code formatting/tidy-up of Example classes

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-08-05 11:42:39 +00: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.