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

Add truncated props in Badge #2603

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Conversation

nayounsang
Copy link
Contributor

Self Checklist

  • I wrote a PR title in English and added an appropriate label to the PR.
  • I wrote the commit message in English and to follow the Conventional Commits specification.
  • I added the changeset about the changes that needed to be released. (or didn't have to)
  • I wrote or updated documentation related to the changes. (or didn't have to)
  • I wrote or updated tests related to the changes. (or didn't have to)
  • I tested the changes in various browsers. (or didn't have to)
    • Windows: Chrome, Edge, (Optional) Firefox
    • macOS: Chrome, Edge, Safari, (Optional) Firefox

Related Issue

Fixes #2591

Summary

  • Add ellipsis to Badge

Details

  • Added truncated props to Badge and added the story of truncated Badge. It supports ellipses in Badge text.
  • The width must be specified from the outside or on itself. Otherwise, even if truncated props are specified, the length will increase because of flex.
  • Same truncated feature of Text.

Breaking change? (Yes/No)

No

References

Copy link

changeset-bot bot commented Feb 8, 2025

🦋 Changeset detected

Latest commit: ec08f0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@channel.io/bezier-react Patch
bezier-figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

channeltalk bot commented Feb 8, 2025

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.86%. Comparing base (4e3beb4) to head (43db6dd).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2603   +/-   ##
=======================================
  Coverage   81.86%   81.86%           
=======================================
  Files         145      145           
  Lines        2889     2889           
  Branches      920      920           
=======================================
  Hits         2365     2365           
+ Misses        520      494   -26     
- Partials        4       30   +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 8, 2025

Chromatic Report

🚀 Congratulations! Your build was successful!

@@ -24,3 +32,16 @@ export const Primary: StoryObj<BadgeProps> = {
variant: 'default',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primary에서도 배포버전에서 truncated: set object 의 control이 생깁니다. 없앨 예정입니다.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 작업 중이신가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네네 죄송합니다 제가 요즘 특히 일이 바빠서 주중에는 힘드네요
혹시 언제까지 진행하면 될까요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

급한건 전혀 아니라 편하게 작업해주셔도 됩니다 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다~

'@channel.io/bezier-react': patch
---

Add truncated props in the Badge
Copy link
Collaborator

@yangwooseong yangwooseong Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor)

Suggested change
Add truncated props in the Badge
Add `truncated` props in the Badge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다!

@yangwooseong yangwooseong added the enhancement Issues or PR related to making existing features better label Feb 18, 2025
Copy link
Contributor

@sungik-choi sungik-choi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기여 감사드립니다 👍

@yangwooseong yangwooseong merged commit 6455a8f into channel-io:main Feb 21, 2025
9 checks passed
sungik-choi pushed a commit that referenced this pull request Feb 21, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @channel.io/[email protected]

### Minor Changes

- Update icons
([#2593](#2593)) by
@ch-builder

    Added

    -   puzzle.svg

## @channel.io/[email protected]

### Minor Changes

- Add `truncated` props in the Badge
([#2603](#2603)) by
@nayounsang

## [email protected]

### Patch Changes

-   Updated dependencies
    -   @channel.io/[email protected]
    -   @channel.io/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues or PR related to making existing features better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ellipsis to Badge
3 participants