Skip to content

Conversation

@TerranceKhumalo-absa
Copy link
Collaborator

@TerranceKhumalo-absa TerranceKhumalo-absa commented Feb 12, 2026

This pull request introduces a new theme toggle feature and standardizes color usage throughout the application to improve consistency and support theming. It adds a ThemeToggleComponent to the top toolbar, updates SCSS variables and component styles to use new CSS custom properties, and ensures that all UI elements respond to theme changes. Additionally, new icons are added to support the theme toggle button.

Resolves #469

Theme and Color Standardization

  • Added ThemeToggleComponent (theme-toggle.component.ts) and integrated it into the top toolbar (app.component.html, app.component.scss, app.module.ts) to allow users to switch between light and dark modes. [1] [2] [3] [4] [5]
  • Updated SCSS variables and component styles across the app and UI kit to use new CSS custom properties (e.g., --cps-accent-primary, --cps-text-primary) for backgrounds, borders, and text, enabling consistent theming. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]

Icon Support

  • Added sun and moon icons to the icon set to visually represent theme switching in the toggle button. [1] [2]

Component and UI Enhancements

  • Improved button, button-toggle, file-upload, and input components to use the new color variables and respond visually to theme changes and states (hover, active, disabled, error). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Minor Updates

  • Adjusted tab and icon colors for improved visual clarity and consistency with the new theme. [1] [2] [3]

These changes collectively enhance the application's visual consistency, accessibility, and user experience by supporting dynamic theming and standardized color usage.

Release notes:

  • Add dark mode support

- Added CpsThemeService for managing light/dark theme switching with persistence in localStorage.
- Introduced dark theme color palette in _colors-dark.scss.
- Updated various components (cps-progress-linear, cps-tab-group, cps-confirmation, cps-dialog) to use new color variables for better consistency and theming.
- Enhanced styles for scrollbar customization.
- Added unit tests for CpsThemeService to ensure functionality.
@github-actions
Copy link

Coverage report for library

St.
Category Percentage Covered / Total
🔴 Statements 29.59% 1864/6299
🔴 Branches 23.24% 489/2104
🔴 Functions 24.94% 338/1355
🔴 Lines 30.44% 1763/5792

Test suite run success

419 tests passing in 21 suites.

Report generated by 🧪jest coverage report action from 4f7c57b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce dark theme

1 participant