Skip to content

feat(ui/user): expose theme switcher for OpenEMS theme - #3945

Merged
sfeilmeier merged 9 commits into
OpenEMS:developfrom
Christoph-87:feat/theme-switcher-for-openems-theme
Sep 4, 2026
Merged

feat(ui/user): expose theme switcher for OpenEMS theme#3945
sfeilmeier merged 9 commits into
OpenEMS:developfrom
Christoph-87:feat/theme-switcher-for-openems-theme

Conversation

@Christoph-87

Copy link
Copy Markdown
Contributor

Introduces isThemeSelectionAvailable getter in UserComponent that returns true for OpenEMS, FENECON, and FENECONBeta themes, replacing the hard-coded FENECON/FENECONBeta check in the template.

Closes #3944

Introduces `isThemeSelectionAvailable` getter in UserComponent that
returns true for OpenEMS, FENECON, and FENECONBeta themes, replacing
the hard-coded FENECON/FENECONBeta check in the template.

Closes OpenEMS#3944
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3945      +/-   ##
=============================================
- Coverage      55.88%   55.34%   -0.54%     
- Complexity     19348    19443      +95     
=============================================
  Files           3705     3840     +135     
  Lines         173321   177237    +3916     
  Branches       14254    14801     +547     
=============================================
+ Hits           96844    98074    +1230     
- Misses         72641    75286    +2645     
- Partials        3836     3877      +41     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Covers all four Theme values: OpenEMS (new), FENECON, FENECONBeta (true)
and Heckert (false).
@Christoph-87
Christoph-87 force-pushed the feat/theme-switcher-for-openems-theme branch from 1729192 to 308ad9f Compare September 3, 2026 12:54
Comment thread ui/src/app/user/user.component.ts Outdated
…ly field

Calling a getter from a template is evaluated on every change-detection
cycle. Since environment.theme is fixed at build time the value never
changes, so a readonly field computed once at instantiation is sufficient.
…buy price is shown

When gridBuyPrice is present both text elements (kW value and price) are
shifted up by 25 px so they appear above the grid icon. The icon position
stays unchanged to keep alignment with the consumption section icon.

The offset is applied lazily in _updateCurrentData because gridBuyPrice
requires an async config fetch and is always null when setElementHeight
runs. setElementHeight resets the tracking flag so the offset is correctly
re-applied after a window resize.
…en grid buy price is shown"

This reverts commit 52df53e.
@sfeilmeier
sfeilmeier merged commit b7bf8cc into OpenEMS:develop Sep 4, 2026
5 of 7 checks passed
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.

Add Dark Mode with automatic system theme detection

2 participants