This document provides a detailed, granular breakdown of the LESS to makeStyles migration plan, building upon the foundation work completed in commit 34d3f8020e40db4623032a8b5f8c909ce9f17763. The plan divides the migration into smaller, manageable subtasks that can be executed independently or in parallel.
-
Design Tokens Infrastructure
- Created
/libs/designer-ui/src/lib/tokens/designTokens.tswith comprehensive token mappings - Established color, size, spacing, typography, and layout tokens
- Created type-safe token access pattern
- Created
-
Migration Pattern Established
- Successfully migrated chatbot library from .less to makeStyles
- Demonstrated pattern for component migration
- Showed dark theme override pattern
-
Documentation Started
- Created CLAUDE.md with project instructions
- Created initial migration plan document
Total estimated tasks: 15 subtasks
- Create spreadsheet mapping all LESS variables to tokens
- Identify missing token mappings in designTokens.ts
- Document tokens that need custom values
- Review Fluent UI v9 token documentation for new additions
- Create list of deprecated LESS variables to remove
-
Animation tokens
- Map transition durations (e.g.,
transition: 0.2s ease-in) - Map animation curves
- Document animation patterns
- Map transition durations (e.g.,
-
State-specific tokens
- Hover state tokens
- Active state tokens
- Focus state tokens
- Disabled state tokens
-
Component-specific tokens
- Card-specific tokens refinement
- Panel-specific tokens
- Editor-specific tokens
- Monitoring view tokens
- Create TypeScript interfaces for custom tokens
- Add JSDoc comments for all token categories
- Create token usage guidelines
- Add token validation utilities
Total estimated tasks: 20 subtasks
- Create
/libs/designer-ui/src/lib/utils/styles/index.ts - Implement
mergeStylesutility for combining makeStyles - Create
conditionalStyleshelper for dynamic styling - Implement
responsiveStylesutility with breakpoint support - Create
themeAwareStyleshelper for theme switching
-
Text utilities
-
truncateText()- single line truncation -
multiLineTruncate()- multi-line truncation -
textOverflow()- custom overflow handling
-
-
Layout utilities
-
flexCenter()- flex centering helper -
flexBetween()- space-between helper -
gridLayout()- grid template helper -
absolutePosition()- positioning helper
-
-
Focus utilities
-
focusVisible()- accessible focus styles -
focusRing()- focus ring implementation -
keyboardOnly()- keyboard-only focus
-
-
Animation utilities
-
fadeIn()- fade in animation -
slideIn()- slide animations -
pulse()- pulse effect -
skeleton()- skeleton loading effect
-
- Create test helpers for makeStyles
- Mock makeStyles for unit tests
- Create visual regression test utilities
Total estimated tasks: 10 subtasks
- Create feature flag for gradual rollout
- Set up parallel build paths (LESS + makeStyles)
- Configure tree-shaking for makeStyles
- Update webpack/vite configs for optimal bundling
- Create VS Code snippets for makeStyles patterns
- Set up ESLint rules for style consistency
- Create migration CLI helper tool
- Set up automated migration tracking
- Create detailed migration guide with examples
- Document common pitfalls and solutions
- Create video walkthrough of migration process
- Set up migration FAQ
Total estimated tasks: 25 subtasks
-
Color variables
- Map theme-agnostic colors
- Map theme-specific colors
- Create color utility functions
- Document color usage patterns
-
Spacing variables
- Map padding values
- Map margin values
- Create spacing scale
- Document spacing system
-
Typography variables
- Map font families
- Map font sizes
- Map line heights
- Map font weights
-
Layout mixins
- Convert flex mixins
- Convert grid mixins
- Convert position mixins
-
Effect mixins
- Convert shadow mixins
- Convert border mixins
- Convert gradient mixins
-
Responsive mixins
- Convert media query mixins
- Convert breakpoint mixins
- Create responsive utilities
- Extract global reset styles
- Convert utility classes to utilities
- Migrate helper classes
- Create common component styles
Total estimated tasks: 15 subtasks
- Create theme provider setup
- Migrate light theme variables
- Migrate dark theme variables
- Create theme switching mechanism
- Add theme persistence
- Create theme test suite
- Add visual regression tests
- Test theme switching performance
- Validate color contrast ratios
Total estimated tasks: 60 subtasks
Week 5 - Breaking into 10 sub-components:
-
Card container styles (50 lines)
- Extract container layout styles
- Convert positioning styles
- Migrate responsive behaviors
-
Card header styles (80 lines)
- Convert header layout
- Migrate icon styles
- Convert title styles
- Handle collapsed states
-
Card body styles (100 lines)
- Convert content area styles
- Migrate padding/spacing
- Handle overflow scenarios
-
Card footer styles (40 lines)
- Convert footer layout
- Migrate button styles
- Handle action areas
-
Card states (60 lines)
- Convert hover states
- Migrate selected states
- Handle disabled states
- Convert focus states
-
Card animations (30 lines)
- Convert expand/collapse animations
- Migrate transition effects
- Handle loading states
-
Card theme variations (50 lines)
- Light theme overrides
- Dark theme overrides
- High contrast support
-
Card responsive styles (40 lines)
- Mobile breakpoint styles
- Tablet adjustments
- Desktop optimizations
-
Card interaction styles (40 lines)
- Drag and drop styles
- Selection indicators
- Context menu triggers
-
Card edge cases (22 lines)
- Error states
- Empty states
- Loading skeletons
-
CardV2 styles (
cardv2.less)- Base v2 styles
- Compact mode styles
- Extended mode styles
-
Subgraph Card (
subgraphCard.less)- Container styles
- Nesting indicators
- Expansion controls
-
Parameter Card styles
- Input container styles
- Label styles
- Validation styles
Total estimated tasks: 35 subtasks
Week 6 - Breaking into 7 sub-components:
-
Panel container (50 lines)
- Layout structure
- Positioning rules
- Z-index management
-
Panel header (40 lines)
- Title styles
- Close button
- Action buttons
-
Panel content (80 lines)
- Scrollable area
- Content padding
- Section dividers
-
Panel footer (30 lines)
- Action bar
- Button alignment
- Status indicators
-
Panel animations (40 lines)
- Slide-in effects
- Fade transitions
- Resize animations
-
Panel responsive (30 lines)
- Mobile full-screen
- Tablet adjustments
- Desktop sizing
-
Panel states (31 lines)
- Loading states
- Error states
- Empty states
Total estimated tasks: 45 subtasks
-
Editor Base (
editor/base/editor.less)- Container styles (5 subtasks)
- Toolbar styles (5 subtasks)
- Content area styles (5 subtasks)
-
Monaco Editor (
editor/monaco/monaco.less)- Editor wrapper (3 subtasks)
- Custom theme overrides (4 subtasks)
- Toolbar integration (3 subtasks)
-
Expression Editor (
expressioneditor/expressioneditor.less)- Expression input styles (4 subtasks)
- Autocomplete styles (4 subtasks)
- Validation indicators (3 subtasks)
- HTML Editor (
html/htmleditor.less- 374 lines)- Rich text toolbar (5 subtasks)
- Content editable area (5 subtasks)
- Preview mode (4 subtasks)
Total estimated tasks: 40 subtasks
-
Dropdown (
dropdown/dropdown.less)- Trigger button (3 subtasks)
- Dropdown menu (4 subtasks)
- Item styles (3 subtasks)
-
Combobox (
combobox/combobox.less)- Input field (3 subtasks)
- Suggestion list (4 subtasks)
- Selection pills (3 subtasks)
-
Array Editor (
arrayeditor/arrayeditor.less)- Item container (4 subtasks)
- Add/remove buttons (3 subtasks)
- Drag handles (3 subtasks)
-
Dictionary Editor (
dictionary/dictionaryeditor.less)- Key-value pairs (4 subtasks)
- Add entry UI (3 subtasks)
- Validation styles (3 subtasks)
These tasks have no dependencies and can be assigned to different team members:
-
Documentation Tasks
- Migration guide creation
- Video tutorials
- Code examples
- FAQ compilation
-
Utility Development
- Style utilities
- Test helpers
- Migration tools
- Linting rules
-
Component Groups (No interdependencies)
- Monitoring components
- Overview components
- Table components
- Icon components
These tasks must be done in order:
- Design Tokens → Utility Functions → Component Migration
- Variables.less → Mixins.less → Component styles
- Base components → Variant components
- Theme structure → Theme overrides → Theme testing
Total estimated tasks: 30 subtasks
- Update component tests for makeStyles
- Create style testing utilities
- Mock makeStyles in tests
- Validate token usage
- Set up Percy/Chromatic
- Create baseline screenshots
- Test all theme variations
- Test responsive breakpoints
- Measure bundle size changes
- Test runtime performance
- Validate tree-shaking
- Check memory usage
Total estimated tasks: 20 subtasks
- Create feature flag system
- Implement A/B testing
- Monitor performance metrics
- Collect user feedback
- Remove all .less files
- Update build configurations
- Remove LESS dependencies
- Update documentation
- Total subtasks: ~350
- Completed: 15
- In Progress: 5
- Blocked: 0
- ✅ VS Code React export.less → exportStyles.ts (PR #7588, #7797)
- ✅ VS Code React overview.less → overviewStyles.ts (PR #7588)
- ✅ VS Code React reviewList component styles → reviewListStyles.ts (PR #7907) - COMPLEX MIGRATION
- Complete architectural change: GroupedList/DetailsRow → Tree component
- Shimmer → Skeleton components for loading states
- Removed styles.less file entirely (32 lines eliminated)
- Simplified component API by removing validationItems parameter
- Updated all consuming components (validation.tsx, review/index.tsx)
- Enhanced accessibility with proper ARIA labels and tree navigation
- ✅ SVG icon migration to Fluent UI icons (PR #7820)
- ✅ nodeSearchPanel component: New makeStyles implementation with Tabster focus management (Branch: ccastrotrejo/panelSearchMigration)
- Migrated from Fluent UI v8
FocusTrapZoneto Tabster for better accessibility - Added new dependency:
tabster: 8.5.6 - Created
nodeSearchPanelStyles.tswith makeStyles for SearchBox styling - Improved keyboard navigation and ARIA compliance
- Migrated from Fluent UI v8
- ✅ Component migrations include Fluent UI v8 → v9 upgrades
- Bundle Size: Target 20% reduction
- Build Time: Target 30% improvement
- Runtime Performance: No regression
- Developer Velocity: Improved after migration
- Keep both LESS and makeStyles during migration
- Use feature flags for gradual rollout
- Maintain visual regression test suite
- Regular team sync meetings
- Git tags at each major milestone
- Feature flag for instant rollback
- Backup of all LESS files
- Documentation of rollback procedures
- Review and approve detailed plan
- Assign team members to parallel tasks
- Set up tracking dashboard
- Begin Phase 1.1.1 (Token Audit)
- Schedule daily stand-ups for migration team