Component: Workspace Card
Component
Section titled “Component”- Name:
WorkspaceCard - Used in:
- Ownership: Shared UI
Purpose / responsibility
Section titled “Purpose / responsibility”Display workspace identity and status (name, image, description, grouped metrics, apps activation chips) and provide an overflow menu for Edit, Duplicate, and Delete actions.
Workspace card body is grouped into:
- Details
- knowledge bases
- agents
- users
- Channels
- social comments
- review platforms
- FB messenger
- web chat
- SMS
- Apps
- existing app activation/list structure
Props / inputs / outputs
Section titled “Props / inputs / outputs”- Inputs:
workspace(full Workspace object),onEdit,onDuplicate,onDelete(callbacks),canDelete(boolean — false when only one workspace exists) - Outputs:
onEdit(workspace),onDuplicate(workspace),onDelete(workspace)when the user chooses the corresponding menu item. Delete is disabled (greyed, non-clickable) whencanDeleteis false. - Side effects: none (parent owns state and dialogs)
Overflow menu
Section titled “Overflow menu”A three-dot (“more”) button in the card header opens a dropdown: Edit (opens edit dialog), Duplicate (clones workspace with ” (Copy)” suffix), Delete (opens delete confirmation; disabled when only one workspace). See Account – Workspaces for dialog and deletion rules.
Variants
Section titled “Variants”- Card (workspaces page card view)
- Table row (workspaces page table view — same actions, different presentation)
States
Section titled “States”- Default: workspace shown
- Loading: skeleton
- Empty: N/A
- Error: fallback (workspace unavailable)
- Disabled: non-selectable (no permission)
Accessibility requirements
Section titled “Accessibility requirements”- Entire card is keyboard-focusable if clickable
- Clear focus ring
- Use semantic button/link when navigable
Security & privacy considerations (if applicable)
Section titled “Security & privacy considerations (if applicable)”- Do not show cross-workspace data
- Avoid showing sensitive metadata (tokens, channel secrets)
Analytics hooks (if applicable)
Section titled “Analytics hooks (if applicable)”workspace.card.clicked(optional)
Dependencies
Section titled “Dependencies”- Domain refs: Domain: Workspaces
- Routes: Account – Workspaces