mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-03-08 01:53:30 +01:00
Phase 5 - BYOB Backend (TASK-007A/B): - LocalSQL Adapter with full CloudStore API compatibility - QueryBuilder translates Parse-style queries to SQL - SchemaManager with PostgreSQL/Supabase export - LocalBackendServer with REST endpoints - BackendManager with IPC handlers for Electron - In-memory fallback when better-sqlite3 unavailable Phase 3 - GitHub Panel (GIT-004): - Issues tab with list/detail views - Pull Requests tab with list/detail views - GitHub API client with OAuth support - Repository info hook integration Phase 3 - Editor UX Bugfixes (TASK-013): - Legacy runtime detection banners - Read-only enforcement for legacy projects - Code editor modal close improvements - Property panel stuck state fix - Blockly node deletion and UI polish Phase 11 - Cloud Functions Planning: - Architecture documentation for workflow automation - Execution history storage schema design - Canvas overlay concept for debugging Docs: Updated LEARNINGS.md and COMMON-ISSUES.md
3.5 KiB
3.5 KiB
TASK-001D Phase 2 Complete: Banner Wired to Editor
Date: 2026-01-13
Status: ✅ Complete
What Was Done
1. EditorBanner Component Created
Location: packages/noodl-editor/src/editor/src/views/EditorBanner/
Files:
EditorBanner.tsx- React component with warning icon, message, and action buttonsEditorBanner.module.scss- Styling using design tokens (no hardcoded colors!)index.ts- Barrel export
Features:
- Fixed positioning below topbar
- Dismissible with state management
- Uses PrimaryButton and TextButton from core-ui
- Warning icon inline SVG
- Responsive design (wraps on small screens)
2. Integration with NodeGraphEditor
Modified Files:
-
packages/noodl-editor/src/editor/src/templates/nodegrapheditor.html- Added
#editor-banner-rootdiv with z-index 1001 (above other elements)
- Added
-
packages/noodl-editor/src/editor/src/views/nodegrapheditor.ts- Added
editorBannerRootReact root property - Created
renderEditorBanner()method - Added handler methods:
handleMigrateNow(),handleLearnMore(),handleDismissBanner() - Called
renderEditorBanner()inrender()method - Updated
setReadOnly()to re-render banner when read-only status changes
- Added
3. Button Component Usage
Fixed imports to use proper button components:
PrimaryButtonwithvariant={PrimaryButtonVariant.Cta}for "Migrate Now"TextButtonfor "Learn More"- These were already part of the UI library
How It Works
- When
NodeGraphEditoris created, it checksthis.readOnlyflag - If read-only,
renderEditorBanner()shows the banner - Banner displays warning message and two action buttons
- User can:
- Click "Migrate Now" → placeholder toast (Phase 4 will wire up real migration)
- Click "Learn More" → placeholder toast (Phase 4 will add documentation link)
- Click X to dismiss → banner hides via internal state
Technical Details
React Integration:
renderEditorBanner() {
if (!this.editorBannerRoot) {
this.editorBannerRoot = createRoot(bannerElement);
}
if (this.readOnly) {
this.editorBannerRoot.render(
React.createElement(EditorBanner, {
onMigrateNow: this.handleMigrateNow.bind(this),
onLearnMore: this.handleLearnMore.bind(this),
onDismiss: this.handleDismissBanner.bind(this)
})
);
} else {
this.editorBannerRoot.render(null);
}
}
Styling (design tokens only):
.EditorBanner {
background: var(--theme-color-warning-bg);
border-bottom: 2px solid var(--theme-color-warning);
color: var(--theme-color-fg-default);
}
Next Steps
Phase 3: Enforce Read-Only Restrictions
The existing readOnly checks should already prevent editing, but we need to verify:
- Nodes cannot be added/deleted
- Connections cannot be created/removed
- Properties cannot be edited
- Copy/paste/cut are disabled
- Undo/redo are disabled
Phase 4: Wire "Migrate Now" Button
- Open MigrationWizard when clicked
- Pass current project context
- Handle migration completion
Testing Needed
Before marking complete, need to test with a legacy React 17 project:
- Open a React 17 project (should be detected as legacy)
- Verify banner appears
- Verify buttons show toast messages
- Verify dismiss works
- Verify read-only restrictions are enforced
Notes
- Banner uses proper design tokens for theming
- Z-index (1001) ensures it's above canvas but not intrusive
- Responsive layout handles small screens
- Component is reusable if needed elsewhere