Fix: prevent energy flow arrow backgrounds from disappearing#3365
Merged
sfeilmeier merged 1 commit intoOpenEMS:developfrom Oct 16, 2025
Merged
Fix: prevent energy flow arrow backgrounds from disappearing#3365sfeilmeier merged 1 commit intoOpenEMS:developfrom
sfeilmeier merged 1 commit intoOpenEMS:developfrom
Conversation
…uplicate SVG gradient IDs.
Codecov Report❌ Patch coverage is ❌ 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:
|
lukasrgr
approved these changes
Oct 16, 2025
Contributor
lukasrgr
left a comment
There was a problem hiding this comment.
thx for your contribution 🚀
sfeilmeier
approved these changes
Oct 16, 2025
Contributor
sfeilmeier
left a comment
There was a problem hiding this comment.
Thank you for your in-depth analysis and for solving this long-pending issue! 🙌
Contributor
Author
Thank you for your feedback. I’m really honored to contribute and glad that this fix helped resolve this long-pending issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.