Problem
The current organization management in fdm-app is implemented as a single, overloaded page (organization.$slug.tsx). This makes it difficult to scale as we add more organization-level features (like aggregated farm views) and results in a cluttered UI where members, invitations, and metadata are all competing for space.
Proposed Solution
Refactor the organization routes to use a nested subpage architecture, leveraging React Router v7's layout routes. This will provide a cleaner navigation experience and a dedicated sidebar context.
1. New Routing Structure
Transform the organization routes into a hierarchy:
/organization/:slug (Layout) -> Shared context, SidebarOrganization.
/organization/:slug/ (Index) -> Dashboard/Overview (currently the main view).
/organization/:slug/members -> Dedicated view for member & invitation management.
/organization/:slug/settings -> Organization metadata (Edit name/description) and "Danger Zone".
2. Dedicated Sidebar (SidebarOrganization)
Create a new sidebar component to replace the generic SidebarPlatform when inside an organization.
- Back to Platform button.
- Organization group:
- Overzicht (LayoutDashboard icon)
- Leden (Users icon)
- Instellingen (Settings icon)
- Aggregation group (Placeholder for items in ISSUE.md):
- Bedrijven (Farms)
- Atlas
- Balans
3. Implementation Tasks
Phase 1: Layout & Navigation
Phase 2: Feature Migration
Phase 3: Update Farm Landing Page
Phase 4: Global Context Switching
UX/UI Improvements
- Clearer Onboarding: After creating an organization, redirect users directly to the "Members" page to encourage inviting others.
- Improved Hierarchy: Use sub-headers and separators to distinguish between active members and pending invitations.
- Mobile Friendly: Ensure the sub-navigation works well in the mobile sidebar drawer.
Problem
The current organization management in
fdm-appis implemented as a single, overloaded page (organization.$slug.tsx). This makes it difficult to scale as we add more organization-level features (like aggregated farm views) and results in a cluttered UI where members, invitations, and metadata are all competing for space.Proposed Solution
Refactor the organization routes to use a nested subpage architecture, leveraging React Router v7's layout routes. This will provide a cleaner navigation experience and a dedicated sidebar context.
1. New Routing Structure
Transform the organization routes into a hierarchy:
/organization/:slug(Layout) -> Shared context, SidebarOrganization./organization/:slug/(Index) -> Dashboard/Overview (currently the main view)./organization/:slug/members-> Dedicated view for member & invitation management./organization/:slug/settings-> Organization metadata (Edit name/description) and "Danger Zone".2. Dedicated Sidebar (
SidebarOrganization)Create a new sidebar component to replace the generic
SidebarPlatformwhen inside an organization.3. Implementation Tasks
Phase 1: Layout & Navigation
app/components/blocks/sidebar/organization.tsx.app/routes/organization.$slug.tsxinto a Layout Route:Outletcontext or shared loader.SidebarOrganizationinstead ofSidebarPlatformin the main layout wrapper.app/routes/organization.$slug._index.tsx.Phase 2: Feature Migration
app/routes/organization.$slug.members.tsx.Tablelayout.app/routes/organization.$slug.settings.tsx.updateOrganizationinfdm-core.Phase 3: Update Farm Landing Page
app/routes/farm._index.tsx./organizationand provide a brief description of how organizations enable collaboration and data aggregation.Phase 4: Global Context Switching
SidebarUserto include an organization switcher as described inISSUE.md.UX/UI Improvements