mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
feat: migrate page components and layouts to JSON (Phase 12)
Migrated 20 page-level and layout components to JSON-based architecture: - SchemaEditorPage, KeyboardShortcutsDialog, PreloadIndicator - PWA components: PWAStatusBar, PWAUpdatePrompt, PWAInstallPrompt - UI components: ConflictCard, ConflictIndicator, ErrorPanel, PreviewDialog - Page templates: NotFoundPage, GlobalSearch - Demo pages: AtomicComponentShowcase, JSONUIShowcasePage, JSONDemoPage DashboardDemoPage, ComprehensiveDemoPage - Feature components: TemplateExplorer, ProjectManager, StorageSettingsPanel Created JSON definitions and interfaces for all components. Updated registry to include 19 new entries (one was duplicate). All components now available as pure JSON exports via json-components.ts. Coverage improvements: - JSON exports: 203 → 224 (+21 components) - JSON definitions: 204 → 225 (+21 files) - Registry entries: 373 → 392 (+19 entries) Build passes with no errors. All page components now use JSON-driven architecture instead of TSX. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"timestamp": "2026-01-21T04:19:49.915Z",
|
||||
"timestamp": "2026-01-21T04:20:39.255Z",
|
||||
"issues": [],
|
||||
"stats": {
|
||||
"totalJsonFiles": 337,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "./schemas/json-components-registry-schema.json",
|
||||
"version": "2.0.0",
|
||||
"description": "Registry of all components in the application",
|
||||
"lastUpdated": "2026-01-21T03:35:00.000Z",
|
||||
"lastUpdated": "2026-01-21T04:19:28.496Z",
|
||||
"categories": {
|
||||
"layout": "Layout and container components",
|
||||
"input": "Form inputs and interactive controls",
|
||||
@@ -4571,6 +4571,196 @@
|
||||
"phase": "9",
|
||||
"notes": "Reusable list header pattern"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "SchemaEditorPage",
|
||||
"name": "Schema Editor Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Schema editor page wrapper",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "KeyboardShortcutsDialog",
|
||||
"name": "Keyboard Shortcuts Dialog",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "Dialog for displaying keyboard shortcuts",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "PreloadIndicator",
|
||||
"name": "Preload Indicator",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "Route preload status indicator",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "PWAStatusBar",
|
||||
"name": "PWA Status Bar",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "PWA status bar component",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "PWAUpdatePrompt",
|
||||
"name": "PWA Update Prompt",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "PWA update prompt dialog",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "PWAInstallPrompt",
|
||||
"name": "PWA Install Prompt",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "PWA installation prompt",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "ConflictCard",
|
||||
"name": "Conflict Card",
|
||||
"category": "display",
|
||||
"canHaveChildren": true,
|
||||
"description": "Card for displaying conflict information",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "ConflictIndicator",
|
||||
"name": "Conflict Indicator",
|
||||
"category": "feedback",
|
||||
"canHaveChildren": false,
|
||||
"description": "Indicator for conflicts",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "PreviewDialog",
|
||||
"name": "Preview Dialog",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Dialog for previewing content",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "NotFoundPage",
|
||||
"name": "Not Found Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "404 page component",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "GlobalSearch",
|
||||
"name": "Global Search",
|
||||
"category": "input",
|
||||
"canHaveChildren": false,
|
||||
"description": "Global search dialog",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "AtomicComponentShowcase",
|
||||
"name": "Atomic Component Showcase",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Showcase for atomic components",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "JSONUIShowcasePage",
|
||||
"name": "JSON UI Showcase Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "JSON UI showcase page",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "JSONDemoPage",
|
||||
"name": "JSON Demo Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "JSON demo page",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "DashboardDemoPage",
|
||||
"name": "Dashboard Demo Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Dashboard demo page",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "ComprehensiveDemoPage",
|
||||
"name": "Comprehensive Demo Page",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Comprehensive demo page",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "TemplateExplorer",
|
||||
"name": "Template Explorer",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Template explorer component",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "ProjectManager",
|
||||
"name": "Project Manager",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Project manager interface",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
},
|
||||
{
|
||||
"type": "StorageSettingsPanel",
|
||||
"name": "Storage Settings Panel",
|
||||
"category": "layout",
|
||||
"canHaveChildren": false,
|
||||
"description": "Panel for storage settings",
|
||||
"status": "supported",
|
||||
"source": "components",
|
||||
"jsonCompatible": true
|
||||
}
|
||||
],
|
||||
"statistics": {
|
||||
@@ -4578,4 +4768,4 @@
|
||||
"jsonCompatible": 223,
|
||||
"coverage": "60%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "conflict-resolution-filters",
|
||||
"type": "Box",
|
||||
"className": "mb-4 flex items-center justify-between",
|
||||
"bindings": {
|
||||
"children": {
|
||||
"source": "props",
|
||||
"type": "template"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/components/json-definitions/json-flask-designer.json
Normal file
7
src/components/json-definitions/json-flask-designer.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"id": "json-flask-designer",
|
||||
"type": "JSONPageRenderer",
|
||||
"props": {
|
||||
"schema": "flaskDesignerConfig"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,39 @@
|
||||
import {
|
||||
ComponentNode,
|
||||
ComponentTree,
|
||||
Lambda,
|
||||
PlaywrightTest,
|
||||
PrismaModel,
|
||||
ProjectFile,
|
||||
StorybookStory,
|
||||
UnitTest,
|
||||
Workflow,
|
||||
} from '@/types/project'
|
||||
|
||||
/**
|
||||
* GlobalSearchProps - JSON definition interface
|
||||
* Global search dialog
|
||||
*/
|
||||
export interface GlobalSearchProps {}
|
||||
export interface GlobalSearchProps {
|
||||
open?: boolean
|
||||
onOpenChange?: (open: boolean) => void
|
||||
searchQuery?: string
|
||||
setSearchQuery?: (query: string) => void
|
||||
recentSearches?: any[]
|
||||
groupedResults?: any[]
|
||||
clearHistory?: () => void
|
||||
removeHistoryItem?: (item: any) => void
|
||||
handleSelect?: (item: any) => void
|
||||
handleHistorySelect?: (item: any) => void
|
||||
files?: ProjectFile[]
|
||||
models?: PrismaModel[]
|
||||
components?: ComponentNode[]
|
||||
componentTrees?: ComponentTree[]
|
||||
workflows?: Workflow[]
|
||||
lambdas?: Lambda[]
|
||||
playwrightTests?: PlaywrightTest[]
|
||||
storybookStories?: StorybookStory[]
|
||||
unitTests?: UnitTest[]
|
||||
onNavigate?: (tab: string, itemId?: string) => void
|
||||
onFileSelect?: (fileId: string) => void
|
||||
}
|
||||
|
||||
@@ -211,6 +211,27 @@ import type {
|
||||
StatusCardProps,
|
||||
InfoSectionProps,
|
||||
ListHeaderProps,
|
||||
SchemaEditorPageProps,
|
||||
KeyboardShortcutsDialogProps,
|
||||
PreloadIndicatorProps,
|
||||
PWAStatusBarProps,
|
||||
PWAUpdatePromptProps,
|
||||
PWAInstallPromptProps,
|
||||
ConflictCardProps,
|
||||
ConflictIndicatorProps,
|
||||
ErrorPanelProps,
|
||||
PreviewDialogProps,
|
||||
NotFoundPageProps,
|
||||
GlobalSearchProps,
|
||||
FileExplorerProps,
|
||||
AtomicComponentShowcaseProps,
|
||||
JSONUIShowcasePageProps,
|
||||
JSONDemoPageProps,
|
||||
DashboardDemoPageProps,
|
||||
ComprehensiveDemoPageProps,
|
||||
TemplateExplorerProps,
|
||||
ProjectManagerProps,
|
||||
StorageSettingsPanelProps,
|
||||
} from './interfaces'
|
||||
|
||||
// Import JSON definitions
|
||||
@@ -419,6 +440,27 @@ import configCardDef from '@/components/json-definitions/config-card.json'
|
||||
import statusCardDef from '@/components/json-definitions/status-card.json'
|
||||
import infoSectionDef from '@/components/json-definitions/info-section.json'
|
||||
import listHeaderDef from '@/components/json-definitions/list-header.json'
|
||||
import schemaEditorPageDef from '@/components/json-definitions/schema-editor-page.json'
|
||||
import keyboardShortcutsDialogDef from '@/components/json-definitions/keyboard-shortcuts-dialog.json'
|
||||
import preloadIndicatorDef from '@/components/json-definitions/preload-indicator.json'
|
||||
import pwaStatusBarDef from '@/components/json-definitions/pwa-status-bar.json'
|
||||
import pwaUpdatePromptDef from '@/components/json-definitions/pwa-update-prompt.json'
|
||||
import pwaInstallPromptDef from '@/components/json-definitions/pwa-install-prompt.json'
|
||||
import conflictCardDef from '@/components/json-definitions/conflict-card.json'
|
||||
import conflictIndicatorDef from '@/components/json-definitions/conflict-indicator.json'
|
||||
import errorPanelDef from '@/components/json-definitions/error-panel.json'
|
||||
import previewDialogDef from '@/components/json-definitions/preview-dialog.json'
|
||||
import notFoundPageDef from '@/components/json-definitions/not-found-page.json'
|
||||
import globalSearchDef from '@/components/json-definitions/global-search.json'
|
||||
import fileExplorerDef from '@/components/json-definitions/file-explorer.json'
|
||||
import atomicComponentShowcaseDef from '@/components/json-definitions/atomic-component-showcase.json'
|
||||
import jsonUiShowcasePageDef from '@/components/json-definitions/json-ui-showcase-page.json'
|
||||
import jsonDemoPageDef from '@/components/json-definitions/json-demo-page.json'
|
||||
import dashboardDemoPageDef from '@/components/json-definitions/dashboard-demo-page.json'
|
||||
import comprehensiveDemoPageDef from '@/components/json-definitions/comprehensive-demo-page.json'
|
||||
import templateExplorerDef from '@/components/json-definitions/template-explorer.json'
|
||||
import projectManagerDef from '@/components/json-definitions/project-manager.json'
|
||||
import storageSettingsPanelDef from '@/components/json-definitions/storage-settings-panel.json'
|
||||
|
||||
// Create pure JSON components (no hooks)
|
||||
export const BindingIndicator = createJsonComponent<BindingIndicatorProps>(bindingIndicatorDef)
|
||||
@@ -771,4 +813,27 @@ export const ShadcnTooltip = createJsonComponent<ShadcnTooltipProps>(shadcnToolt
|
||||
export const ShadcnTooltipTrigger = createJsonComponent<ShadcnTooltipTriggerProps>(shadcnTooltipTriggerDef)
|
||||
export const ShadcnTooltipContent = createJsonComponent<ShadcnTooltipContentProps>(shadcnTooltipContentDef)
|
||||
|
||||
// Phase 12: Page-level components and layouts
|
||||
export const SchemaEditorPage = createJsonComponent<SchemaEditorPageProps>(schemaEditorPageDef)
|
||||
export const KeyboardShortcutsDialog = createJsonComponent<KeyboardShortcutsDialogProps>(keyboardShortcutsDialogDef)
|
||||
export const PreloadIndicator = createJsonComponent<PreloadIndicatorProps>(preloadIndicatorDef)
|
||||
export const PWAStatusBar = createJsonComponent<PWAStatusBarProps>(pwaStatusBarDef)
|
||||
export const PWAUpdatePrompt = createJsonComponent<PWAUpdatePromptProps>(pwaUpdatePromptDef)
|
||||
export const PWAInstallPrompt = createJsonComponent<PWAInstallPromptProps>(pwaInstallPromptDef)
|
||||
export const ConflictCard = createJsonComponent<ConflictCardProps>(conflictCardDef)
|
||||
export const ConflictIndicator = createJsonComponent<ConflictIndicatorProps>(conflictIndicatorDef)
|
||||
export const ErrorPanel = createJsonComponent<ErrorPanelProps>(errorPanelDef)
|
||||
export const PreviewDialog = createJsonComponent<PreviewDialogProps>(previewDialogDef)
|
||||
export const NotFoundPage = createJsonComponent<NotFoundPageProps>(notFoundPageDef)
|
||||
export const GlobalSearch = createJsonComponent<GlobalSearchProps>(globalSearchDef)
|
||||
export const FileExplorer = createJsonComponent<FileExplorerProps>(fileExplorerDef)
|
||||
export const AtomicComponentShowcase = createJsonComponent<AtomicComponentShowcaseProps>(atomicComponentShowcaseDef)
|
||||
export const JSONUIShowcasePage = createJsonComponent<JSONUIShowcasePageProps>(jsonUiShowcasePageDef)
|
||||
export const JSONDemoPage = createJsonComponent<JSONDemoPageProps>(jsonDemoPageDef)
|
||||
export const DashboardDemoPage = createJsonComponent<DashboardDemoPageProps>(dashboardDemoPageDef)
|
||||
export const ComprehensiveDemoPage = createJsonComponent<ComprehensiveDemoPageProps>(comprehensiveDemoPageDef)
|
||||
export const TemplateExplorer = createJsonComponent<TemplateExplorerProps>(templateExplorerDef)
|
||||
export const ProjectManager = createJsonComponent<ProjectManagerProps>(projectManagerDef)
|
||||
export const StorageSettingsPanel = createJsonComponent<StorageSettingsPanelProps>(storageSettingsPanelDef)
|
||||
|
||||
// All components converted to pure JSON! 🎉
|
||||
|
||||
@@ -358,6 +358,25 @@ export const jsonUIComponentTypes = [
|
||||
"StatusCard",
|
||||
"InfoSection",
|
||||
"ListHeader",
|
||||
"SchemaEditorPage",
|
||||
"KeyboardShortcutsDialog",
|
||||
"PreloadIndicator",
|
||||
"PWAStatusBar",
|
||||
"PWAUpdatePrompt",
|
||||
"PWAInstallPrompt",
|
||||
"ConflictCard",
|
||||
"ConflictIndicator",
|
||||
"PreviewDialog",
|
||||
"NotFoundPage",
|
||||
"GlobalSearch",
|
||||
"AtomicComponentShowcase",
|
||||
"JSONUIShowcasePage",
|
||||
"JSONDemoPage",
|
||||
"DashboardDemoPage",
|
||||
"ComprehensiveDemoPage",
|
||||
"TemplateExplorer",
|
||||
"ProjectManager",
|
||||
"StorageSettingsPanel",
|
||||
] as const
|
||||
|
||||
export type JSONUIComponentType = typeof jsonUIComponentTypes[number]
|
||||
|
||||
Reference in New Issue
Block a user