Skip to content

Commit

Permalink
fix(fuselage): Bubble missing text truncation (#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris authored Aug 28, 2024
1 parent 5237bf4 commit 277dffa
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-chairs-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/fuselage": patch
---

fix(fuselage): Bubble missing text truncation
8 changes: 8 additions & 0 deletions packages/fuselage/src/components/Bubble/Bubble.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ WithoutAction.args = {
secondary: true,
};

export const WithLargeText = Template.bind({});
WithLargeText.args = {
children:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum libero viverra nulla varius, a consequat ante malesuada. Fusce bibendum, lacus sed fermentum sagittis, urna erat viverra lacus, eu pellentesque neque est nec nisl. Morbi in lobortis dui, ac consectetur mi.',
secondary: true,
onClick: action('click'),
};

export const Small = Template.bind({});
Small.args = {
children: '22 Nov 2023',
Expand Down
6 changes: 6 additions & 0 deletions packages/fuselage/src/components/Bubble/Bubble.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@

border-radius: lengths.border-radius(extra-large);
column-gap: lengths.padding(8);

@include typography.use-with-truncated-text;

> span {
@include typography.use-with-truncated-text;
}
}

&:not(.rcx-bubble__group) &__item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,24 @@ exports[`[Bubble Rendering] renders Small without crashing 1`] = `
</body>
`;

exports[`[Bubble Rendering] renders WithLargeText without crashing 1`] = `
<body>
<div>
<div
class="rcx-bubble rcx-box rcx-box--full "
>
<button
class="rcx-box rcx-box--full rcx-bubble__button rcx-bubble__button--secondary"
>
<span>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum libero viverra nulla varius, a consequat ante malesuada. Fusce bibendum, lacus sed fermentum sagittis, urna erat viverra lacus, eu pellentesque neque est nec nisl. Morbi in lobortis dui, ac consectetur mi.
</span>
</button>
</div>
</div>
</body>
`;

exports[`[Bubble Rendering] renders WithoutAction without crashing 1`] = `
<body>
<div>
Expand Down

0 comments on commit 277dffa

Please sign in to comment.