Gap Analysis
Summary of gaps between mdxui types and current implementations
Gap Analysis
This document summarizes all gaps between the mdxui type definitions and the current UI component implementations.
Summary
| Category | Defined in mdxui | Implemented | Gap |
|---|---|---|---|
| Site Layout | 5 | 2 | 3 missing |
| Site Sections | 6 | 4 | 2 missing |
| Site Content | 4 | 0 | 4 missing |
| App Layout | 4 | 1 | 3 missing |
| App Features | 6 | 5 | 1 missing |
| App Admin | 3 | 0 | 3 missing |
Critical Gaps (Must Have)
Site Components
| Component | Priority | Effort | Notes |
|---|---|---|---|
Site | P0 | Medium | Root wrapper with providers |
Page | P0 | Low | Generic page layout |
Blog | P1 | High | Auto-wires to posts |
Docs | P1 | High | Auto-wires to docs |
App Components
| Component | Priority | Effort | Notes |
|---|---|---|---|
Shell | P0 | Medium | Layout container |
Sidebar | P0 | Medium | Navigation sidebar |
Header | P0 | Low | Top header bar |
Props Alignment Needed
High Priority
-
Header (Site)
- Current:
links,primaryCta,secondaryCta - Target:
nav,cta - Breaking change: Yes
- Current:
-
Hero (Site)
- Current:
highlightedText,description, button props - Target:
subtitle,cta,secondaryCta - Breaking change: Yes
- Current:
-
DeveloperDashboard (App)
- Current:
configobject - Target: Individual props OR config
- Breaking change: Possible
- Current:
Lower Priority
- FAQ/FAQs naming
- LandingLayout → LandingPage naming
- Page components → standalone components
New Types to Consider Adding
Based on what exists in implementations but not in mdxui:
From Landing Package
// Hero enhancements
interface HeroProps {
highlightedText?: string
backgroundType?: 'image' | 'hatch' | 'none'
codeTabs?: CodeTabItem[]
}
// Directory component
interface DirectoryProps {
categories: DirectoryCategory[]
items: DirectoryItem[]
}From Dashboards Package
// Additional routes
interface AppComponents {
Database?: Component<DatabaseProps>
Integrations?: Component<IntegrationsProps>
Vault?: Component<VaultProps>
}
// Enhanced config pattern
interface DeveloperDashboardProps {
// Option 1: Individual props
project: string
showAPIKeys?: boolean
// ...
// Option 2: Config object
config?: DashboardConfig
}Migration Path
Phase 1: Non-Breaking Additions
- Add missing components to UI packages
- Add optional config pattern alongside props
- Add new component types to mdxui
Phase 2: Deprecation
- Mark old prop names as deprecated
- Add migration warnings
- Document migration path
Phase 3: Breaking Changes
- Remove deprecated props
- Enforce new naming conventions
- Major version bump
Decision Points
These require discussion before proceeding:
1. Config Object vs Individual Props
Option A: Individual props (current mdxui approach)
<DeveloperDashboard
project="proj-123"
showAPIKeys={true}
showWebhooks={true}
/>Option B: Config object (current dashboards approach)
<DeveloperDashboard config={{
identity: { clientId: '...' },
routes: { keys: true, webhooks: true },
}} />Option C: Both (flexibility)
// Either works
<DeveloperDashboard project="proj-123" />
<DeveloperDashboard config={config} />2. Auto-Wiring Location
Where should auto-wiring logic live?
- Option A: In mdxui (types + wiring config)
- Option B: In workers (runtime only)
- Option C: Split (config in mdxui, runtime in workers)
3. Component Granularity
Should complex features be:
- Option A: Single component (
<Webhooks />) - Option B: Multiple pages (
<WebhooksEndpoints />,<WebhooksLogs />) - Option C: Composable (
<Webhooks><Endpoints /><Logs /></Webhooks>)
Next Steps
- Decide on config pattern approach
- Create Shell, Sidebar, Header in dashboards
- Create Site, Page in landing
- Align Hero and Header props
- Add Blog/Docs components (or defer to separate package)
- Update mdxui types based on decisions