Commit Graph

104 Commits

Author SHA1 Message Date
Tara West
5049826ca3 feat(element-configs): Auto-apply defaults on node creation
- Added ElementConfigRegistry import to NodeGraphNode
- Modified constructor to call applyDefaults() for new nodes
- Only applies when node has typename and no existing parameters
- Completes MVP 2: Node Integration + Auto-defaults

New nodes (Button, Text, etc.) now automatically get:
- Sensible default values from their config
- Token-based styling (e.g., var(--theme-color-primary))
- Proper sizing (Text gets display: flex, width: auto)

Part of STYLE-002 MVP implementation.
Next: Test in app, then MVP 3 (Variants + UI).
2026-01-15 10:51:01 +01:00
Tara West
cd5f647659 feat(element-configs): Initialize configs at app startup
- Added initElementConfigs() function in ElementConfigs/index.ts
- Calls registry.register() for ButtonConfig and TextConfig
- Integrated into Router constructor (called after LessonTemplatesModel init)
- Configs now load when editor starts
- Console log shows '[ ElementConfigs] Initialized with X configs'

Part of STYLE-002 MVP 2 implementation.
Next: Hook into node creation to auto-apply defaults.
2026-01-15 10:48:52 +01:00
Tara West
ea62e07bc6 feat(element-configs): Add TextConfig + fix Text element sizing bug
- TextConfig with 10 semantic typography variants
  * display, h1, h2, h3, h4 (headings)
  * body, body-sm (body text)
  * caption, label, code (special text)
- All variants use design tokens
- Fix Text element bug: width 'auto' instead of stretching to 100%
- Text now properly sizes to content with display: flex + width: auto

Part of STYLE-002 MVP 1 implementation.
Next: MVP 2 - Node Integration.
2026-01-15 10:39:50 +01:00
Tara West
e370d40931 test(element-configs): Add comprehensive unit tests for Registry
- 47 unit tests covering all Registry functionality
- Tests: singleton, registration, validation, defaults, variants, sizes
- Tests: style resolution, sources tracking, registry operations
- Tests ButtonConfig structure (6 variants, 4 sizes, states)
- Mock nodes for testing apply operations
- All tests ready for execution with proper test runner

Part of STYLE-002 MVP implementation.
2026-01-15 10:34:44 +01:00
Tara West
af1b5085b1 feat(element-configs): MVP 1 Infrastructure - Types, Registry, ButtonConfig
- Created ElementConfigTypes.ts with complete type definitions
- Implemented ElementConfigRegistry singleton with full CRUD operations
- Added ButtonConfig with 6 variants (primary, secondary, outline, ghost, destructive, link)
- Added 4 size presets (sm, md, lg, xl) for buttons
- All types compile without errors
- Registry methods: register, get, applyDefaults, applyVariant, resolveStyles, validate
- Token-based styling with var(--token-name) references

Part of STYLE-002 MVP implementation.
Next: TextConfig + Text sizing bug fix.
2026-01-15 10:23:17 +01:00
Tara West
505de200ce feat(tokens): STYLE-001 MVP complete - 10 default tokens system
- Implemented StyleTokensModel for managing design tokens
- Added StyleTokensInjector to inject tokens into viewer preview
- 10 essential default tokens (primary, background, foreground, border, spacing, radius, shadows)
- Token storage in project metadata (styleTokens field)
- Real-time CSS variable injection in preview
- Fixed bug: tokens now inject for legacy projects without styleTokens field
- Tested and validated (see TEST-REPORT.md)

MVP does NOT include:
- UI panel for editing tokens
- Token picker component
- Import/export functionality
- Full token set (only 10 essentials)

These features are planned for STYLE-001 Full implementation.
2026-01-15 10:04:27 +01:00
Tara West
aa814e17b9 Merge origin/cline-dev - kept local version of LEARNINGS.md 2026-01-12 13:44:53 +01:00
Tara West
188d993420 working on problem opening projet 2026-01-12 13:27:19 +01:00
Richard Osborne
39fe8fba27 Finished Blockly prototype, updated project template json 2026-01-12 13:23:12 +01:00
Richard Osborne
9b3b2991f5 feat(blockly): Phase C Step 7 COMPLETE - Code generation & port detection
Wired up complete code generation and I/O detection pipeline:
- Created BlocklyEditorGlobals to expose detectIO and generateCode
- Runtime node accesses detectIO via window.NoodlEditor
- Dynamic port updates based on workspace changes
- Full integration between editor and runtime
- Auto-initialization via side-effect import

Complete flow now works:
1. User edits blocks in BlocklyWorkspace
2. Workspace JSON saved to node parameter
3. IODetector scans workspace for inputs/outputs/signals
4. Dynamic ports created automatically
5. Code generated for runtime execution

Next: Testing and verification
2026-01-11 14:09:54 +01:00
Richard Osborne
4960f43df5 feat(blockly): Phase C Step 6 COMPLETE - Property panel Edit Blocks button
Implemented custom property editor for Logic Builder workspace:
- Created LogicBuilderWorkspaceType with styled button UI
- Added editorType='logic-builder-workspace' to node definition
- Registered LogicBuilderWorkspaceType in Ports.ts mapping
- Button emits LogicBuilder.OpenTab event with node details
- Integrated with existing property panel system

Next: Step 7 - Code generation and port detection
2026-01-11 14:07:32 +01:00
Richard Osborne
fbf01bf0f7 feat(blockly): Phase C Step 5 COMPLETE - NodeGraphEditor tab integration
Full integration of canvas tabs into NodeGraphEditor:
- Added renderCanvasTabs() method to render React tab system
- Added handleBlocklyWorkspaceChange() for workspace persistence
- Added cleanup in dispose() for React roots
- Added event listener for LogicBuilder.OpenTab events
- Tabs now render above canvas with provider wrapping

Ready for Phase C Steps 6-7 (property panel + code generation)
2026-01-11 14:00:51 +01:00
Richard Osborne
f861184b96 feat(blockly): Phase C Step 5 WIP - Add imports and template for tabs
- Updated nodegrapheditor.html template with canvas-tabs-root
- Added imports for CanvasTabsProvider and CanvasTabs
- Added canvasTabsRoot property to NodeGraphEditor class

Next: Add render logic and event handlers
2026-01-11 13:59:44 +01:00
Richard Osborne
30a70a4eb3 feat(blockly): Phase C Steps 1-4 - Core tab system components
Created complete tab system foundation:
- CanvasTabsContext: React Context for tab state management
- CanvasTabs component: Tab UI with canvas/Blockly switching
- Theme-aware SCSS styling using design tokens
- Full TypeScript types and exports

Next: Integrate into NodeGraphEditor, add property panel button
2026-01-11 13:55:04 +01:00
Richard Osborne
8039791d7e fix(blockly): Fix Logic Builder node color scheme crash
Changed category from 'Logic' to 'CustomCode' and color from 'purple' to 'javascript' to match Expression node pattern. This ensures the node picker can find the correct color scheme.

Fixes: EditorNode crash 'Cannot read properties of undefined (reading text)'
Issue: colors prop was undefined because color scheme 'purple' doesn't exist
2026-01-11 13:42:25 +01:00
Richard Osborne
5dc704d3d5 feat(blockly): Phase B1 - Register Logic Builder node
- Created IODetector utility to scan workspaces for I/O blocks
- Implemented Logic Builder runtime node with:
  - Dynamic port detection from workspace
  - Code execution context with Noodl API access
  - Signal input triggers for logic execution
  - Error handling and reporting
- Registered node in runtime and added to Custom Code category

The node should now appear in the node picker under Custom Code.
Next: Phase C - Tab system prototype

Part of TASK-012: Blockly Visual Logic Integration
2026-01-11 13:37:19 +01:00
Richard Osborne
554dd9f3b4 feat(blockly): Phase A foundation - Blockly setup, custom blocks, and generators
- Install blockly package (~500KB)
- Create BlocklyWorkspace React component with serialization
- Define custom Noodl blocks (Input/Output, Variables, Objects, Arrays)
- Implement JavaScript code generators for all custom blocks
- Add theme-aware styling for Blockly workspace
- Export initialization functions for easy integration

Part of TASK-012: Blockly Visual Logic Integration
2026-01-11 13:30:13 +01:00
Richard Osborne
6f08163590 new code editor 2026-01-11 09:48:20 +01:00
Richard Osborne
7fc49ae3a8 Tried to complete Github Oauth flow, failed for now 2026-01-10 00:04:52 +01:00
Tara West
6aa45320e9 feat(editor): implement embedded template system (TASK-009)
- Add ProjectTemplate TypeScript interfaces for type-safe templates
- Implement EmbeddedTemplateProvider for bundled templates
- Create Hello World template (Router + Home page + Text)
- Update LocalProjectsModel to use embedded templates by default
- Remove programmatic project creation workaround
- Fix: Add required fields (id, comments, metadata) per TASK-010
- Fix: Correct node type 'PageRouter' → 'Router'
- Add comprehensive developer documentation

Benefits:
- No more path resolution issues (__dirname/process.cwd())
- Works identically in dev and production
- Type-safe template definitions
- Easy to add new templates

Closes TASK-009 (Phase 3 - Editor UX Overhaul)
2026-01-09 12:25:16 +01:00
Tara West
a104a3a8d0 fix(editor): resolve project creation bug - missing graph structure
TASK-010: Fixed critical P0 bug preventing new project creation

Problem:
- Programmatic project.json generation had incorrect structure
- Missing 'graph' object wrapper
- Missing 'comments' and 'connections' arrays
- Error: Cannot read properties of undefined (reading 'comments')

Solution:
- Corrected project.json structure with proper graph object
- Added component id field
- Included all required arrays (roots, connections, comments)
- Added debug logging for better error tracking

Impact:
- New users can now create projects successfully
- Unblocks user onboarding
- No more cryptic error messages

Documentation:
- Added comprehensive entry to LEARNINGS.md
- Created detailed CHANGELOG.md
- Updated README.md with completion status
2026-01-09 10:22:48 +01:00
Tara West
e3b682d037 Merge remote-tracking branch 'origin/cline-dev' into cline-dev-tara
:wq
Merge remote-tracking branch 'origin/cline-dev' into cline-dev-tara
2026-01-08 14:30:17 +01:00
Tara West
199b4f9cb2 Fix app startup issues and add TASK-009 template system refactoring 2026-01-08 13:36:03 +01:00
Richard Osborne
67b8ddc9c3 Added custom json edit to config tab 2026-01-08 13:27:38 +01:00
Richard Osborne
4a1080d547 Refactored dev-docs folder after multiple additions to organise correctly 2026-01-07 20:28:40 +01:00
Richard Osborne
3bf411d081 Added styles overhaul task docs 2026-01-06 00:27:56 +01:00
Richard Osborne
d144166f79 Tried to add data lineage view, implementation failed and requires rethink 2026-01-04 22:31:21 +01:00
Richard Osborne
bb9f4dfcc8 feat(topology): shelve Topology Map panel due to visual quality issues
- Disable Topology Map panel in router.setup.ts
- Comment out panel registration (line ~85)
- Add comprehensive SHELVED.md documentation explaining:
  * Why feature was shelved (SVG text layout complexity, visual quality)
  * What was implemented (graph analysis, folder aggregation, etc.)
  * Lessons learned and better approaches for future
  * Alternative enhancement suggestions
- Code remains in codebase for potential future revival
- Recommend React Flow or HTML/CSS approach instead of SVG
2026-01-04 20:07:25 +01:00
Richard Osborne
eb90c5a9c8 Added three new experimental views 2026-01-04 00:17:33 +01:00
Richard Osborne
2845b1b879 Added initial github integration 2026-01-01 21:15:51 +01:00
Richard Osborne
cfaf78fb15 Finished node canvas UI tweaks. Failed to add connection highlighting 2026-01-01 16:11:21 +01:00
Richard Osborne
2e46ab7ea7 Fixed visual issues with new dashboard and added folder attribution 2025-12-31 21:40:47 +01:00
Richard Osborne
73b5a42122 initial ux ui improvements and revised dashboard 2025-12-31 09:34:27 +01:00
Richard Osborne
ae7d3b8a8b New data query node for Directus backend integration 2025-12-30 11:55:30 +01:00
Richard Osborne
6fd59e83e6 Finished HTTP node creation and extensive node creation documentation in project 2025-12-29 08:56:46 +01:00
Richard Osborne
fad9f1006d Finished component sidebar updates, with one small bug remaining and documented 2025-12-28 22:07:29 +01:00
Richard Osborne
5f8ce8d667 Working on the editor component tree 2025-12-23 09:39:33 +01:00
Richard Osborne
89c7160de8 Made visual changes to the migration wizard 2025-12-21 11:27:41 +01:00
Richard Osborne
03a464f6ff React 19 runtime migration complete, AI-assisted migration underway 2025-12-20 23:32:50 +01:00
Richard Osborne
7d307066d8 Added some community improvement suggestions in docs 2025-12-17 09:30:30 +01:00
Richard Osborne
ea45e8b3a3 fix(preview): add missing font MIME types to web server
- Added MIME type mappings for .otf, .woff, and .woff2 font formats
- Fixed missing break statement after .wav case (was falling through to .mp4)
- Fonts now load correctly in editor preview without 404 errors
- Resolves OTS parsing error messages in console

The web server was already serving project directory files correctly,
but browsers were rejecting font files due to missing/incorrect MIME types.

Related to TASK-006
2025-12-15 22:57:48 +01:00
Richard Osborne
0b47d19776 Finished inital project migration workflow 2025-12-15 11:58:55 +01:00
Richard Osborne
1477a29ff7 Started tasks to migrate runtime to React 19. Added phase 3 projects 2025-12-13 22:37:44 +01:00
Richard Osborne
dbaf7489dc fix(runtime): add HTTP Request node to Node Picker External Data category 2025-12-08 21:36:59 +01:00
Richard Osborne
0a95c3906b Fixed click handling bug with editor node canvas 2025-12-08 21:33:14 +01:00
Richard Osborne
0485a1f837 feat(data): add HTTP Request node with declarative configuration
- New HTTP Request node (net.noodl.HTTP) for API integration
- URL path parameter detection (/users/{userId} creates input ports)
- Dynamic ports for headers, query params, body fields
- Authentication presets: None, Bearer, Basic, API Key
- Response mapping with JSONPath extraction
- Body types: JSON, Form Data, URL Encoded, Raw
- Timeout and cancel support

Phase 2 Task 1 - Core implementation complete
2025-12-08 17:17:27 +01:00
Richard Osborne
e927df760f Tasks completed to update Storybook and Typescript versions. Please see phase-1-summary.md for details 2025-12-08 16:19:56 +01:00
Richard Osborne
ef1ffdd593 feat(typescript): upgrade TypeScript to 5.9.3, remove transpileOnly workaround
- Upgrade TypeScript from 4.9.5 to 5.9.3
- Upgrade @typescript-eslint/parser from 5.62.0 to 7.18.0
- Upgrade @typescript-eslint/eslint-plugin from 5.62.0 to 7.18.0
- Remove transpileOnly: true workaround from webpack.renderer.core.js
- Fix 9 type errors from TS5's stricter checks:
  - PropertyPanelBaseInput.tsx: Fix event handler types
  - keyboardhandler.ts: Fix KeyMod return type
  - model.ts: Remove unused @ts-expect-error directives
  - ScreenSizes.ts: Add proper type guard predicate

Closes TASK-006
2025-12-08 16:09:31 +01:00
Richard Osborne
8fed72d025 Updated project to React 19 2025-12-07 17:32:53 +01:00
Richard Osborne
2153baf627 Finished task 1. Added task for backwards compatibility on existing Noodl projects 2025-12-06 23:24:55 +01:00