From c433d945c4935260c583520d9c994fc8af13a176 Mon Sep 17 00:00:00 2001 From: Alona Date: Thu, 15 May 2025 09:25:44 +0200 Subject: [PATCH 1/3] fix(component): fix animation error in post-collapsible when inside inactive tabs --- .../src/components/post-collapsible/post-collapsible.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/post-collapsible/post-collapsible.tsx b/packages/components/src/components/post-collapsible/post-collapsible.tsx index 85b8a04165..cc8bb94515 100644 --- a/packages/components/src/components/post-collapsible/post-collapsible.tsx +++ b/packages/components/src/components/post-collapsible/post-collapsible.tsx @@ -77,7 +77,10 @@ export class PostCollapsible { await animation.finished; - animation.commitStyles(); + const isVisible = this.host.offsetParent || this.host.offsetWidth || this.host.offsetHeight; + if (isVisible) { + animation.commitStyles(); + } return open; } From 0afbf0b9e74d8fe7e44f35a85af39f3696511fad Mon Sep 17 00:00:00 2001 From: Alona Date: Thu, 15 May 2025 09:38:57 +0200 Subject: [PATCH 2/3] chore(chnageset): added a changeset --- .changeset/tricky-buckets-sniff.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tricky-buckets-sniff.md diff --git a/.changeset/tricky-buckets-sniff.md b/.changeset/tricky-buckets-sniff.md new file mode 100644 index 0000000000..4164bdf30b --- /dev/null +++ b/.changeset/tricky-buckets-sniff.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Fixed an issue where `post-accordion` placed inside inactive tabs would throw animation errors. \ No newline at end of file From 6016a481a4dddd2ec9c250390d2b03e0fcdbf11e Mon Sep 17 00:00:00 2001 From: Alona Date: Thu, 15 May 2025 09:46:34 +0200 Subject: [PATCH 3/3] chore(changeset): added a changeset --- .changeset/tricky-buckets-sniff.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tricky-buckets-sniff.md b/.changeset/tricky-buckets-sniff.md index 4164bdf30b..1b592677b9 100644 --- a/.changeset/tricky-buckets-sniff.md +++ b/.changeset/tricky-buckets-sniff.md @@ -2,4 +2,4 @@ '@swisspost/design-system-components': patch --- -Fixed an issue where `post-accordion` placed inside inactive tabs would throw animation errors. \ No newline at end of file +Resolved an issue where `post-accordion` components placed within inactive tab panels caused animation-related exceptions. \ No newline at end of file