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

Deprecate imageUrl props in Emoji component #2400

Merged

Conversation

yangwooseong
Copy link
Collaborator

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

Summary

  • Emoji 컴포넌트에서 url 을 직접 받는 로직을 제거하고 컴포넌트 내부에서 name, size 속성으로부터 url 을 만드는 것으로 변경합니다.

Details

  • breaking change를 발생시키지 않기 위해 imageUrl 만 optional 로 변경하고 name 타입을 아이콘 이름의 union type(e.g. 'smiley' | 'grinning' | ... )으로 좁히지 않았습니다.
  • 채널톡 데스크에서 자이언트 이모지를 보여주는 경우는 size=60 일 때이고, 이때는 asset size가 160인 url 을 넣어주고 있습니다. 이 기조에 맞춰서 size >= 60일 떄는 asset size 160으로 url 을 만들었습니다.

Breaking change? (Yes/No)

  • No

References

  • None

@yangwooseong yangwooseong added the enhancement Issues or PR related to making existing features better label Aug 1, 2024
@yangwooseong yangwooseong self-assigned this Aug 1, 2024
Copy link

changeset-bot bot commented Aug 1, 2024

🦋 Changeset detected

Latest commit: 4b204e5

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 Aug 1, 2024

args: {
size: '24',
imageUrl: MOCK_EMOJI_URL,
Copy link
Collaborator Author

@yangwooseong yangwooseong Aug 1, 2024

Choose a reason for hiding this comment

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

name이 required임에도 불구하고 타입에러가 나지 않고 있었습니다. satisfies 를 사용하면 이를 방지할 수 있습니다.

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Chromatic Report

🚀 Congratulations! Your build was successful!

@yangwooseong yangwooseong merged commit da4e598 into channel-io:main Aug 1, 2024
7 checks passed
@yangwooseong yangwooseong deleted the WEB-3488/deprecate-image-url branch August 1, 2024 09:09
yangwooseong pushed a commit that referenced this pull request Aug 5, 2024
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]

### Patch Changes

- Deprecate `imageUrl` props of `Emoji` component.
([#2400](#2400)) by
@yangwooseong

- Fix `OutlineItem` component's icon size and gap between icon and
leftContent.
([#2403](#2403)) by
@yangwooseong

- Prevent right button of `TextField` from shrinking.
([#2375](#2375)) by
@yangwooseong

- Keep the color of text when hovering over the tertiary `Button`
component.
([#2381](#2381)) by
@yangwooseong

## [email protected]

### Patch Changes

-   Updated dependencies
    -   @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
Archived in project
Development

Successfully merging this pull request may close these issues.

Deprecate imageUrl and get url from name props in Emoji component
2 participants