Skip to content

Commit 4ffabaf

Browse files
hifi-philclaude
andcommitted
Simplify workspace extension documentation
- Updated workspace README intro text to be more concise and clear - Changed "include several types that work together through shared state management" to "can be grouped into these types" - Restored workspace action menu items content after merge 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ea0e183 commit 4ffabaf

File tree

2 files changed

+10
-75
lines changed

2 files changed

+10
-75
lines changed

16/umbraco-cms/customizing/extending-overview/extension-types/workspaces/README.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ description: >-
55

66
# Extension Types: Workspaces
77

8-
Workspace extensions provide functionality that operates within specific workspace environments, such as document editing, media management, or member editing. These extensions can communicate through shared workspace contexts to create cohesive, integrated functionality.
8+
Workspace extensions are specialized components that enhance Umbraco's editing environments for documents, media, and members. They share state through workspace contexts, enabling coordinated functionality like synchronized actions, real-time status updates, and seamless data flow between different parts of the editing interface.
99

1010
## Available Extension Types
1111

12-
Workspace extensions include several types that work together through shared state management:
12+
Workspace extensions can be grouped into these types:
1313

1414
### Core Extensions
1515
- **[Workspace Context](workspace-context.md)** - Provides shared state management and communication between workspace extensions
@@ -27,10 +27,11 @@ Workspace extensions include several types that work together through shared sta
2727

2828
Workspace extensions communicate through shared contexts using these patterns:
2929

30-
1. **Workspace Context** manages centralized state using observables that automatically notify subscribers of changes
31-
2. **Workspace Actions** consume the context to modify state when users interact with buttons or menu items
32-
3. **Workspace Views** observe context state to automatically update their UI when data changes
33-
4. **Footer Apps** monitor context state to display real-time status information
30+
1. **[Workspace Context](workspace-context.md)** manages centralized state using observables that automatically notify subscribers of changes
31+
2. **[Workspace Actions](workspace-editor-actions.md)** consume the context to modify state when users interact with buttons or menu items
32+
3. **[Workspace Actions Menu Items](workspace-action-menu-items.md)** add additional options for workspace actions
33+
4. **[Workspace Views](workspace-views.md)** observe context state to automatically update their UI when data changes
34+
5. **[Footer Apps](workspace-footer-apps.md)** monitor context state to display real-time status information
3435

3536
### Communication Flow
3637

@@ -44,16 +45,6 @@ Workspace Views (State Display)
4445
Footer Apps (Status Monitoring)
4546
```
4647

47-
## Getting Started
48-
49-
To create a complete workspace extension system:
50-
51-
1. **Start with a [Workspace Context](workspace-context.md)** to provide shared state management
52-
2. **Add [Workspace Actions](workspace-editor-actions.md)** for primary user interactions
53-
3. **Create [Workspace Views](workspace-views.md)** for dedicated editing interfaces
54-
4. **Include [Footer Apps](workspace-footer-apps.md)** for persistent status information
55-
5. **Extend actions with [Menu Items](workspace-action-menu-items.md)** for additional functionality
56-
5748
{% hint style="info" %}
5849
All workspace extensions are automatically scoped to their workspace instance, ensuring that extensions in different workspaces cannot interfere with each other.
5950
{% endhint %}

16/umbraco-cms/customizing/extending-overview/extension-types/workspaces/workspace-action-menu-items.md

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@ description: >-
77

88
Workspace Action Menu Items extend existing workspace actions by adding dropdown menu options. They provide secondary functionality that relates to the primary action without cluttering the workspace footer.
99

10-
## Purpose
11-
12-
Action Menu Items provide:
13-
- **Secondary actions** that extend primary workspace actions
14-
- **Grouped functionality** under a single action button
15-
- **Progressive disclosure** for related operations
16-
- **Context integration** with workspace state
17-
18-
{% hint style="info" %}
19-
Action Menu Items are associated with specific Workspace Actions using the `forWorkspaceActions` property.
20-
{% endhint %}
21-
2210
## Manifest
2311

2412
{% code caption="manifest.ts" %}
@@ -47,7 +35,7 @@ Action Menu Items are associated with specific Workspace Actions using the `forW
4735

4836
## Implementation
4937

50-
Create a workspace action menu item by extending `UmbWorkspaceActionMenuItemBase` and implementing the `execute` method. This provides the functionality that runs when users select the menu item:
38+
Create a workspace action menu item by extending `UmbWorkspaceActionMenuItemBase` and implementing the `execute` method. This provides the functionality that runs when users interacts with the menu item:
5139

5240
{% code caption="reset-counter-menu-item.action.ts" %}
5341
```typescript
@@ -72,7 +60,7 @@ export const api = ExampleResetCounterMenuItemAction;
7260

7361
## Action Relationship
7462

75-
Menu items create dropdown menus for their associated actions:
63+
Menu items display a dropdown menu for their associated actions:
7664

7765
### Primary Action
7866
```typescript
@@ -100,48 +88,4 @@ Menu items create dropdown menus for their associated actions:
10088
forWorkspaceActions: 'example.workspaceAction.save',
10189
meta: { label: 'Save as Draft' },
10290
}
103-
```
104-
105-
## Use Cases
106-
107-
### Alternative Operations
108-
Provide different ways to perform related actions:
109-
```typescript
110-
// Primary: Quick save
111-
// Menu: Save and close, Save as template, Save and publish
112-
```
113-
114-
### Destructive Actions
115-
Keep dangerous operations in dropdown menus:
116-
```typescript
117-
// Primary: Edit
118-
// Menu: Delete, Archive, Reset
119-
```
120-
121-
### Context-Specific Options
122-
Add options that depend on entity state:
123-
```typescript
124-
override async execute() {
125-
const entityContext = await this.getContext(ENTITY_CONTEXT);
126-
127-
if (entityContext.isDraft()) {
128-
await entityContext.saveAsDraft();
129-
} else {
130-
await entityContext.saveAndPublish();
131-
}
132-
}
133-
```
134-
135-
## Best Practices
136-
137-
### Related Functionality
138-
Only group actions that are logically related to the primary action.
139-
140-
### Clear Labels
141-
Use descriptive labels that clearly indicate the menu item's purpose.
142-
143-
### Appropriate Ordering
144-
Use weight to order menu items by importance or frequency of use.
145-
146-
### Context Dependencies
147-
Always check context availability before performing operations.
91+
```

0 commit comments

Comments
 (0)