From fd15f2bd7bc1fda6e8a34edc4fe5be974cb04210 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Fri, 1 Nov 2024 23:30:06 -0300 Subject: [PATCH] fix(fuselage): Skip empty strings when appending class name (#1474) --- .changeset/chilly-rockets-bow.md | 5 + .../__snapshots__/AutoComplete.spec.tsx.snap | 20 ++-- .../Avatar/__snapshots__/Avatar.spec.tsx.snap | 72 ++++++------ .../__snapshots__/Callout.spec.tsx.snap | 36 +++--- .../Card/__snapshots__/Card.spec.tsx.snap | 10 +- .../__snapshots__/CardGroup.spec.tsx.snap | 108 +++++++++--------- .../__snapshots__/CheckBox.spec.tsx.snap | 12 +- .../__snapshots__/Contextualbar.spec.tsx.snap | 26 ++--- .../__snapshots__/Contextualbar.spec.tsx.snap | 16 +-- .../Field/__snapshots__/Field.spec.tsx.snap | 10 +- .../MessageMetrics.spec.tsx.snap | 12 +- .../MessageReactions.spec.tsx.snap | 6 +- .../MessageToolbar.spec.tsx.snap | 14 +-- .../Modal/__snapshots__/Modal.spec.tsx.snap | 104 ++++++++--------- .../NavBar/__snapshots__/NavBar.spec.tsx.snap | 28 ++--- .../__snapshots__/PasswordInput.spec.tsx.snap | 2 +- .../__snapshots__/RadioButton.spec.tsx.snap | 12 +- .../__snapshots__/SelectInput.spec.tsx.snap | 2 +- .../TopBar/__snapshots__/TopBar.spec.tsx.snap | 28 ++--- .../Table/__snapshots__/Table.spec.tsx.snap | 4 +- .../Tag/__snapshots__/Tag.spec.tsx.snap | 46 ++++---- .../__snapshots__/ToastBar.spec.tsx.snap | 10 +- .../__snapshots__/ToggleSwitch.spec.tsx.snap | 12 +- .../fuselage/src/helpers/appendClassName.ts | 2 +- 24 files changed, 301 insertions(+), 296 deletions(-) create mode 100644 .changeset/chilly-rockets-bow.md diff --git a/.changeset/chilly-rockets-bow.md b/.changeset/chilly-rockets-bow.md new file mode 100644 index 0000000000..b45864a643 --- /dev/null +++ b/.changeset/chilly-rockets-bow.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/fuselage': patch +--- + +Fixes a bug that adds an extra whitespace when concatenating class names with `appendClassName` diff --git a/packages/fuselage/src/components/AutoComplete/__snapshots__/AutoComplete.spec.tsx.snap b/packages/fuselage/src/components/AutoComplete/__snapshots__/AutoComplete.spec.tsx.snap index 39f1090330..453f640da8 100644 --- a/packages/fuselage/src/components/AutoComplete/__snapshots__/AutoComplete.spec.tsx.snap +++ b/packages/fuselage/src/components/AutoComplete/__snapshots__/AutoComplete.spec.tsx.snap @@ -12,7 +12,7 @@ exports[`[AutoComplete Rendering] renders CustomItem without crashing 1`] = ` > @@ -43,7 +43,7 @@ exports[`[AutoComplete Rendering] renders CustomSelected without crashing 1`] = >
@@ -172,7 +172,7 @@ exports[`[AutoComplete Rendering] renders Multiple without crashing 1`] = ` >
Contextualbar Title
@@ -37,7 +37,7 @@ exports[`[Contextualbar Rendering] renders Default without crashing 1`] = ` role="group" >
Contextualbar Empty
@@ -186,7 +186,7 @@ exports[`[Contextualbar Rendering] renders Empty without crashing 1`] = ` role="group" >