3.3 KiB
3.3 KiB
Nodes 2.0 Support - Testing Guide
✅ What Was Added
Your Niutonian Themes now support BOTH Classic Nodes and Nodes 2.0!
Dual-Mode Architecture:
- Classic Mode (Canvas): Uses your existing canvas-based rendering
- Nodes 2.0 Mode (DOM): Uses new CSS-based rendering with custom properties
🧪 How to Test
Step 1: Test in Classic Mode (Default)
- Open ComfyUI
- Your themes should work exactly as before
- Try switching themes via menu or
Alt + 1-9 - ✅ Everything should look the same as before
Step 2: Enable Nodes 2.0
- Go to Settings (gear icon)
- Find "Modern Node Design (Nodes 2.0)" under Experimental
- Toggle it ON
- ComfyUI will reload
Step 3: Test Themes in Nodes 2.0 Mode
- Right-click canvas → "🎨 Niutonian Theme"
- Try switching between themes
- Check the browser console (F12) for messages like:
[NiutonianNodeStyles] 🎨 Applying Nodes 2.0 theme: Modern Dark
Step 4: Test Mode Switching
- With a theme applied, go back to Settings
- Toggle "Modern Node Design (Nodes 2.0)" OFF
- ComfyUI will reload to Classic mode
- Your theme should still be applied (canvas-based)
- Toggle it back ON
- Theme should switch to CSS-based rendering
🎨 What Works in Nodes 2.0
✅ Fully Supported:
- All 11 built-in themes
- Custom themes
- Theme colors (backgrounds, borders, text)
- Shadow effects
- Corner radius
- Glow effects
- Glass effects
- Scanlines (cyberpunk theme)
- Executing node animations
- Per-node themes
- Theme toggle/disable
⚠️ Differences from Classic:
- Rendering is DOM-based (HTML elements) instead of canvas
- Some visual effects may look slightly different
- Performance characteristics differ (generally better)
🐛 Troubleshooting
Theme not applying in Nodes 2.0?
- Open browser console (F12)
- Look for error messages
- Check if you see:
[NiutonianNodeStyles] 🎨 Applying Nodes 2.0 theme - Try hard refresh:
Ctrl + Shift + R
Theme looks different in Nodes 2.0?
This is normal! DOM rendering vs canvas rendering will have slight visual differences. The colors and effects are the same, but the rendering method is different.
Switching modes doesn't update theme?
- Try manually switching themes after mode change
- Check console for errors
- Hard refresh the page
📝 Technical Details
How It Works:
Detection:
isVueNodesEnabled() // Checks if Nodes 2.0 is active
Classic Mode:
- Uses
LiteGraphcanvas API - Overrides
drawNodeShape,drawTitleBarBackground - Direct canvas manipulation with
ctx.fillStyle, etc.
Nodes 2.0 Mode:
- Uses CSS custom properties
- Injects
<style>tag with theme CSS - Maps theme colors to
--component-node-*variables
Auto-Switching:
- Listens for
Comfy.VueNodes.Enabledsetting changes - Automatically applies appropriate theming method
- Seamless transition between modes
🎯 Next Steps
- Test thoroughly in both modes
- Report any issues you find
- Compare visual differences between modes
- Test all 11 themes in Nodes 2.0
- Test custom themes you've created
💾 Backup
Your backup is at: F:\CLAUDE\NIUTONIAN_LITEGRAPH\ComfyUI-Niutonian-Themes copy
If anything goes wrong, you can restore from there!
Happy Testing! 🎨✨