Skip to content

Fix: prevent energy flow arrow backgrounds from disappearing#3365

Merged
sfeilmeier merged 1 commit intoOpenEMS:developfrom
girasolenergy:UI_fix_09
Oct 16, 2025
Merged

Fix: prevent energy flow arrow backgrounds from disappearing#3365
sfeilmeier merged 1 commit intoOpenEMS:developfrom
girasolenergy:UI_fix_09

Conversation

@Jasonlee6789
Copy link
Contributor

Problem:
Intermittent disappearance of energy flow arrows (background color) when navigating between tabs. The
white animated arrow would remain visible, but the colored background would vanish. A page refresh would temporarily resolve the issue.

Root Cause:
SVG element IDs must be unique across the entire DOM.
When Ionic’s router reuses components (without destroying them), multiple elements with the same fillRef/id can persist in the DOM. As a result, browsers were unable to reliably resolve which gradient to use, leading to intermittent disappearance of the background color for the energy flow arrows.

Solution:
The sectionId used for the SVG gradient definition in AbstractSection is now guaranteed to be unique for each component instance by appending a UUID to the translateName. This ensures that each fillRef references a distinct ID. As a result, rendering conflicts in reused components are eliminated, and the background color for all energy flow arrows is always displayed as expected.
Resolves the intermittent disappearance of energy flow arrow background colors.
Ensures robust and correct SVG gradient rendering in all component reuse scenarios.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3365      +/-   ##
=============================================
+ Coverage      59.78%   59.82%   +0.04%     
  Complexity       112      112              
=============================================
  Files           2785     2785              
  Lines         120785   120785              
  Branches        9015     9015              
=============================================
+ Hits           72205    72243      +38     
+ Misses         45901    45852      -49     
- Partials        2679     2690      +11     
🚀 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.

@Jasonlee6789 Jasonlee6789 marked this pull request as ready for review October 16, 2025 04:14
Copy link
Contributor

@lukasrgr lukasrgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for your contribution 🚀

@lukasrgr lukasrgr requested a review from sfeilmeier October 16, 2025 08:37
Copy link
Contributor

@sfeilmeier sfeilmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your in-depth analysis and for solving this long-pending issue! 🙌

@sfeilmeier sfeilmeier merged commit 46350b1 into OpenEMS:develop Oct 16, 2025
6 of 7 checks passed
@Jasonlee6789
Copy link
Contributor Author

Thank you for your in-depth analysis and for solving this long-pending issue! 🙌

Thank you for your feedback. I’m really honored to contribute and glad that this fix helped resolve this long-pending issue.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants