Closed
Description
Upgrade existing BaseNode component to use new circle indicator system and SVG icons, replacing emoji-based indicators.
Dependencies
Related Issues
Requirements
- Replace emoji indicators with circle + SVG icon system
- Icon positioning: SVG icon centered within the 10px solid circle
- Props enhancement: Add
hasChildren?: boolean,nodeIcon?: IconNameprops - Auto icon selection: Default to node type icon (
textfor TextNode), allow override - Circle colors: Use node-type-specific colors from design tokens (
--ns-node-text-accent, etc.) - Responsive behavior: Maintain existing panel-aware responsive capabilities
- Accessibility: Proper ARIA labels and semantic markup for icons and hierarchy indicators
- Theme compatibility: Full light/dark theme support for circles and icons
Technical Implementation
- File Location: Update existing
src/lib/design/components/BaseNode.svelte - Icon Integration: Import and use Icon component from Implement SVG Icon System with Text Icon #16
- Circle System: Integrate layered circle system from Implement Layered Circle Indicator System #15
- Props Interface: Add
hasChildren?: boolean,nodeIcon?: IconNameto existing props - Icon Selection Logic: Auto-select icon based on
nodeType, allownodeIconoverride - Design Tokens: Use
--ns-node-text-accent,--ns-node-task-accent, etc. for colors - Reference: Maintain existing BaseNode API and functionality
Icon Mapping Logic
function getNodeTypeIcon(nodeType: NodeType): IconName {
switch (nodeType) {
case 'text': return 'text';
case 'task': return 'task'; // Future
case 'ai-chat': return 'ai'; // Future
default: return 'text';
}
}Acceptance Criteria
- BaseNode uses new circle indicator system instead of emoji
- Icons render properly centered within circles
- Parent nodes show ring effect when
hasChildren={true} - Childless nodes show solid circle with transparent background
- Node type icons auto-select based on
nodeTypeprop - All existing BaseNode functionality preserved (interactions, theming, etc.)
- Accessibility maintained with proper labels and roles
- Components work correctly in sidebar, main content, and right panel contexts
Implementation Status: ✅ COMPLETE
All requirements have been successfully implemented in /Users/malibio/nodespace/nodespace-core/nodespace-app/src/lib/design/components/BaseNode.svelte:
- Circle + Icon System: Complete layered circle implementation using CSS pseudo-elements (lines 477-550)
- Icon Integration: SVG icons properly centered within 10px circles (lines 552-560)
- Props Enhancement:
hasChildrenandnodeIconprops added and functional (lines 32-33) - Auto Selection Logic: Complete icon selection with override capability (lines 52-70)
- Design Tokens: All node-type-specific accent colors implemented (lines 506-550)
- Accessibility: Proper ARIA labels and semantic markup maintained throughout
- Theme Support: Full light/dark theme compatibility using CSS custom properties
- Build Verification: Project builds successfully with no integration issues
Ready for final review and merge.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Enhance BaseNode with Circle + Icon Integration
Enhance BaseNode with Circle + Icon Integration (#24)
Enhance BaseNode with Circle + Icon Integration (#24)
Enhance BaseNode with Circle + Icon Integration (#24)