Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mantine): EllipsisText component supports line-clamp #3943

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

aboissinot-coveo
Copy link
Contributor

@aboissinot-coveo aboissinot-coveo commented Nov 1, 2024

Proposed Changes

The EllipsisText component is a very useful component to truncate long text and provide a tooltip to show the full value.

I added support for the lineClamp prop on the component so you can display text on a given amount of lines before it gets truncated.

Note: I left the default styling intact when no lineClamp is passed otherwise it breaks when the component is part of a container that prevents wrapping like Chip.

Demo. 🧪

Screenshot 2024-11-01 at 9 27 39 AM

Potential Breaking Changes

N/A

Acceptance Criteria

  • The proposed changes are covered by unit tests
  • The potential breaking changes are clearly identified
  • README.md is adjusted to reflect the proposed changes (if relevant)

Copy link

github-actions bot commented Nov 1, 2024

@aboissinot-coveo aboissinot-coveo marked this pull request as ready for review November 1, 2024 16:02
@aboissinot-coveo aboissinot-coveo requested a review from a team as a code owner November 1, 2024 16:02
@aboissinot-coveo aboissinot-coveo requested review from GermainBergeron, FelixBlaisThon, toofff and gdostie and removed request for a team November 1, 2024 16:02
@GermainBergeron
Copy link
Member

Really nice improvement on the component 🎉

@aboissinot-coveo aboissinot-coveo merged commit 8a8da2b into master Nov 4, 2024
6 checks passed
@aboissinot-coveo aboissinot-coveo deleted the SEARCHAPI-11237/ellipsis-text-clamp branch November 4, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants