Commit 3b89208
feat(ui): modernize editor UI with monochrome design system (#592)
* feat(ui): modernize editor UI with shadcn-style design system
Major UI overhaul implementing shadcn-inspired design with glassmorphic
elements in dark mode and clean monochromatic styling in light mode.
## New UI Package (com.jasonxudeveloper.jengine.ui)
### Components
- **Button**: JButton, JToggleButton, JButtonGroup with 5 variants
- **Form**: JFormField, JTextField, JDropdown, JToggle, JObjectField
- **Layout**: JCard, JSection, JStack, JRow for composition
- **Feedback**: JStatusBar, JLogView, JProgressBar
- **Navigation**: JBreadcrumb with clean hierarchical display
### Theme System
- Design tokens (Tokens.cs) with dark/light theme support
- Glassmorphic palette for dark mode (translucent layers, vibrant accents)
- shadcn-style monochromatic palette for light mode (black/white/grey only)
- 8px spacing grid, typography scale, border radius system
- Smooth transitions (150-300ms)
### Enhanced Editor UIs
- BootstrapEditorUI: Redesigned Bootstrap inspector with modern components
- PanelUI: Redesigned Panel window with enhanced scene management
## Core Package Improvements
### Code Deduplication
- **EditorUtils.cs**: Extracted 6 shared helper methods from BootstrapEditor
and BootstrapEditorUI (GetAvailableAsmdefFiles, GetAvailableHotScenes,
GetAvailableHotClasses, GetAvailableHotMethods,
GetAvailableDynamicSecretKeys, GetAvailableAOTDataFiles)
- **BuildHelper.cs**: New shared build execution logic with UI callbacks,
eliminating ~200 lines of duplication between Panel.cs and PanelUI.cs
### Bug Fixes
- Panel.cs: Added null checks in LogMessage to prevent crashes when using
enhanced PanelUI
- PanelUI: Creates its own BuildManager with proper log routing to JLogView
## Design Decisions
### Light Theme Philosophy
- Monochromatic black/white/grey only (no colors except semantic highlights)
- Buttons use grey shades (Primary: gray-700, Secondary: gray-300)
- Clean, minimal aesthetic inspired by shadcn/ui
### Dark Theme Philosophy
- Glassmorphic translucent layers (40-80% opacity)
- Vibrant cyan accents (#06B6D4) with subtle glow effects
- 5-level glass system (Base → Subtle → Surface → Elevated → Overlay)
### Component Patterns
- Fluent API for chaining (.WithText().FullWidth())
- Consistent spacing and sizing across all components
- Theme-aware colors (automatically adapt to Unity editor theme)
- Proper keyboard navigation with visible focus states
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
* refactor(ui): eliminate closure allocations in event callbacks
Replace lambda closures with static lambdas and state parameters to avoid
heap allocations in RegisterCallback calls. Updated 6 component files:
- JBreadcrumb: static methods with state parameters
- JCard: instance methods
- JStack: static lambda with tuple state
- JToggle: static lambdas with state parameters
- JObjectField: instance methods + static lambdas with state
- JTextField: static lambdas with state parameters
This improves performance by eliminating 14 closure allocations across
the UI toolkit components using C#9 static lambda support.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
* refactor(ui): simplify dark theme to monochrome grayscale
Replace vibrant glassmorphic design with clean monochrome palette where
dark theme is the grayscale inversion of light theme.
Changes:
- Remove all vibrant accent colors (cyan, emerald, rose, amber)
- Dark theme now uses black/white/greys inverted from light theme
- Light theme colors remain unchanged
- Remove opacity-based glass layers, use solid greys
- Update JToggle to use Primary/Secondary instead of Accent
- Simplify comments to reflect new monochrome approach
Color mapping (dark theme inverted from light):
- BgBase: #0F1419 (near-black) ← #FFFFFF (white)
- BgSurface: #374151 (gray-700) ← #E5E7EB (gray-200)
- TextPrimary: #FFFFFF (white) ← #111827 (gray-900)
- Primary: #D1D5DB (gray-300) ← #374151 (gray-700)
- Borders: #4B5563 (gray-600) ← #D1D5DB (gray-300)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
* refactor(ui): fix dark theme colors to pure neutral greys
Improved dark theme to use truly neutral RGB greys (R=G=B) instead of
blue-tinted colors. Fixed three visual issues from user feedback:
1. Primary button color too dark - changed dark theme to use lighter
#C8C8C8 grey for better contrast with white text
2. Status bar showing blue - removed colored backgrounds in dark mode,
now uses neutral grey like light mode (monochrome design)
3. Log view too black - changed from BgBase (#0A0A0A) to BgSubtle
(#1A1A1A) for slightly lighter background
Color changes (dark theme only, light theme unchanged):
- BgBase: #0F1419 → #0A0A0A (pure neutral black)
- BgSubtle: #1F2937 → #1A1A1A (pure neutral dark grey)
- BgSurface: #374151 → #2A2A2A (pure neutral grey)
- BgElevated: #4B5563 → #3A3A3A (pure neutral medium-dark grey)
- BgOverlay: #6B7280 → #4A4A4A (pure neutral medium grey)
- Primary: #D1D5DB → #C8C8C8 (lighter for better button contrast)
- All text/borders now use neutral greys (#FFFFFF, #D0D0D0, etc.)
JStatusBar now uses monochrome design in both themes (no colored
backgrounds in dark mode).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
* refactor(ui): improve dark theme with proper color inversions and contrast
Fixed multiple visual issues in dark theme based on user feedback:
1. Button colors now properly inverted:
- Dark Primary (#D0D0D0) = Light Secondary
- Dark Secondary (#374151) = Light Primary
- True grayscale inversion between themes
2. Input field backgrounds differentiated:
- New BgInput color (#353535) lighter than BgSurface in dark mode
- Applies to JTextField, JObjectField, and JDropdown
- Better visual separation from surrounding surface
3. Toggle styling fixed:
- Track colors match Primary/Secondary button colors
- Thumb stays white in both themes (no inversion)
4. Separator/divisor visibility improved:
- BorderSubtle lightened to #454545 in dark mode
- Now visible against darker backgrounds
5. Button text colors use theme tokens:
- JButton and JToggleButton use PrimaryText/SecondaryText
- No more hardcoded Color.white
- Dark Primary buttons now have black text (#111111)
6. Log view lightened:
- Uses BgSubtle (#252525) instead of BgBase
- More readable background
Color mapping (dark theme):
- Primary: #D0D0D0 (light grey, black text)
- Secondary: #374151 (dark grey, white text)
- BgInput: #353535 (for inputs)
- BgSubtle: #252525 (for log view)
- BorderSubtle: #454545 (for separators)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
* fix(ui): correct Primary button hover/active colors for true inversion
Fixed Primary button hover and active states to properly invert with light
theme's Secondary colors:
Dark mode Primary (was wrong):
- Hover: #E0E0E0 → #9A9A9A (now matches light's SecondaryHover)
- Active: #C0C0C0 → #6A6A6A (now matches light's SecondaryActive)
Now the inversion is complete and consistent across all button states.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
---------
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 4c635ad commit 3b89208
File tree
79 files changed
+6805
-220
lines changed- .github/instructions
- UnityProject/Packages
- com.jasonxudeveloper.jengine.core/Editor
- CustomEditor
- com.jasonxudeveloper.jengine.ui
- Editor
- Components
- Base
- Button
- Feedback
- Form
- Layout
- Internal
- Styles
- Theming
- Utilities
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
79 files changed
+6805
-220
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
Lines changed: 152 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments