mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
First user-visible surface for the Spaces foundation. Two components: SpaceSwitcher (header dropdown) - Shows the active space name + type badge - Opens a dropdown listing all user's spaces with per-type color chips (brand / club / family / team / practice / personal) - Click on a space → /organization/set-active + full page reload so every liveQuery re-evaluates against the new active space - "+ Neuer Space" entry at the bottom opens the Create dialog SpaceCreateDialog (modal) - Type picker with description per type (excluding personal — that one is auto-created at signup and never chosen manually) - Name input + live slug preview (same slugifier as the server) - Conditional fields: voiceDoc for brand/club, uid + legalEntity for brand/club/practice - POSTs to /api/auth/organization/create with metadata.type, then /set-active and reload. beforeCreateOrganization hook rejects malformed metadata server-side. Placement: compact bar at the top of the (app) max-w-7xl wrapper, only rendered when authenticated. Zero changes to PillNavigation so the rest of the nav surface stays untouched. Reactivity note: the switcher full-reloads on set-active because the scoped-db wrapper doesn't yet invalidate liveQueries on active-space change. A reactive-invalidation path can replace the reload once the wrapper is used across enough modules to make the UX friction matter. Plan: docs/plans/spaces-foundation.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||