A view-initialized class is now added when the components view is rendered, and we then wait until this class is added before we apply the transition.
Additionally, instead of using stroke-dashoffset I have refactored the stroke to use only the dasharray attribute to set a stroke and gap length.
One downside of this approach is that even with a stroke of length 0, we end up applying a stroke width, so we always draw a little dot when the value is 0.
To work around this I have added a conditional that sets the stroke width to 0, when value is 0.
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Are there any additional context?
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Reminders
[x] Make sure you have implemented tests following the guidelines in: "The good: Test".
[x] Make sure you have updated the cookbook with examples and showcases (for bug fixes, enhancements & new components).
Review
[x] Determine if your changes are a fix, feature or breaking-change, and add the matching label to your PR. If it is tooling, dependency updates or similar, add ignore-for-release.
Which issue does this PR close?
This PR closes #3441
What is the new behavior?
The issue described here https://github.com/kirbydesign/designsystem/issues/3441#issuecomment-2056620529 happens because the colored part of the circle is rendered before the attribute bindings for
stroke-dashoffset
andstroke-dasharray
have been evaluated, so the full circle is shown.A view-initialized class is now added when the components view is rendered, and we then wait until this class is added before we apply the transition.
Additionally, instead of using stroke-dashoffset I have refactored the stroke to use only the dasharray attribute to set a stroke and gap length. One downside of this approach is that even with a stroke of length 0, we end up applying a stroke width, so we always draw a little dot when the value is 0.
To work around this I have added a conditional that sets the stroke width to 0, when value is 0.
Does this PR introduce a breaking change?
Are there any additional context?
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Reminders
Review
When the pull request has been approved it will be merged to
develop
by Team Kirby.