Skip to content

Conversation

michelroegl-brunner
Copy link
Member

@michelroegl-brunner michelroegl-brunner commented Oct 7, 2025

Summary

This PR implements a comprehensive UI refactoring that removes execution_mode dependencies, aligns components with the new Button component, removes dark mode functionality, and standardizes colors using globals.css.

Major Changes Made

Execution Mode Refactoring

  • ✅ Removed ExecutionModeBadge import and usage
  • ✅ Updated filtering logic to use server_name presence instead of execution_mode
  • ✅ Simplified update script logic by removing mode property
  • ✅ Updated Terminal component call to determine mode based on server presence
  • ✅ Replaced ExecutionModeBadge in table with simple text display
  • ✅ Maintained backend API compatibility by keeping execution_mode in mutations
  • ✅ Used nullish coalescing operator (??) for better null handling

UI Component Alignment

  • ✅ Aligned all components with the new unified Button component
  • ✅ Replaced custom button implementations with standardized Button component
  • ✅ Ensured consistent button styling across all components

Dark Mode Removal

  • ✅ Removed DarkModeProvider component
  • ✅ Removed DarkModeToggle component
  • ✅ Cleaned up dark mode related state management
  • ✅ Simplified theme handling

Color Standardization

  • ✅ Removed all hardcoded colors in favor of CSS variables from globals.css
  • ✅ Updated components to use semantic color tokens
  • ✅ Ensured consistent color scheme across the application
  • ✅ Improved maintainability through centralized color management

Additional Improvements

  • ✅ Added new UI components (ui/button.tsx, lib/utils.ts)
  • ✅ Removed unused components (ProxmoxCheck.tsx)
  • ✅ Updated package dependencies
  • ✅ Enhanced TypeScript configuration

Technical Details

The refactoring simplifies the codebase by:

  • Automatically determining execution mode based on server presence
  • Using a unified design system with consistent components
  • Centralizing color management through CSS variables
  • Removing unnecessary complexity from theme switching

Files Changed

  • 31 files modified with 1,117 additions and 849 deletions
  • New components: ui/button.tsx, lib/utils.ts
  • Removed components: DarkModeProvider.tsx, DarkModeToggle.tsx, ProxmoxCheck.tsx
  • Updated: All major UI components for consistency

Testing

  • All linting errors resolved
  • Components render correctly with new design system
  • Filtering works as expected
  • Update functionality works for both local and SSH modes
  • Add script functionality works correctly
  • Color scheme is consistent across all components
  • Button components work uniformly throughout the app

- Remove ExecutionModeBadge import and usage
- Update filtering logic to use server_name presence instead of execution_mode
- Simplify update script logic by removing mode property
- Update Terminal component call to determine mode based on server presence
- Replace ExecutionModeBadge in table with simple text display
- Maintain backend API compatibility by keeping execution_mode in mutations
- Use nullish coalescing operator (??) for better null handling
@michelroegl-brunner michelroegl-brunner requested a review from a team as a code owner October 7, 2025 07:56
@michelroegl-brunner michelroegl-brunner changed the title Remove execution_mode dependencies from InstalledScriptsTab UI Refactoring: Remove execution_mode dependencies and align with new design system Oct 7, 2025
@michelroegl-brunner michelroegl-brunner changed the title UI Refactoring: Remove execution_mode dependencies and align with new design system refactor: Unified all UI colors, added reusable components. Removed Lightmode Oct 7, 2025
@michelroegl-brunner michelroegl-brunner merged commit b366a33 into main Oct 7, 2025
4 checks passed
@michelroegl-brunner michelroegl-brunner deleted the refactor/unify_ui branch October 7, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant