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

fix(form-label/helper-text): fix merging of classname not working properly when inside a FormControl #2156

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

sungik-choi
Copy link
Contributor

@sungik-choi sungik-choi commented Apr 11, 2024

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

Summary

FormControl 내부에 위치한 FormLabel, FormHelperText(ErrorMessage)에 className 오버라이드가 잘 적용되지 않는 문제를 수정합니다.

Details

베지어 마이그레이션 과정에서 FormControl이 FormLabel, FormHelperText에게 래퍼 스타일을 전달하는 과정이 변경되었습니다.

변경 과정에서 get***Props 함수가 반환하는 className 과 인자로 받는 className 의 속성명이 서로 겹치게 되었는데, 이 때 두 className이 모두 적용되는 게 아니라 인자로 받는 className 이 우선순위를 가지고 적용되면서 FormControl이 전달하는 래퍼 스타일이 무시되는 버그가 있었습니다. 이를 수정합니다.

Breaking change? (Yes/No)

No

References

@sungik-choi sungik-choi added the fix PR related to bug fix label Apr 11, 2024
@sungik-choi sungik-choi self-assigned this Apr 11, 2024
Copy link

changeset-bot bot commented Apr 11, 2024

🦋 Changeset detected

Latest commit: 0c4b04a

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
Contributor

github-actions bot commented Apr 11, 2024

Chromatic Report

🚀 Congratulations! Your build was successful!

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.62%. Comparing base (15da8c2) to head (0c4b04a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2156      +/-   ##
==========================================
- Coverage   86.63%   86.62%   -0.01%     
==========================================
  Files         126      126              
  Lines        2656     2655       -1     
  Branches      791      786       -5     
==========================================
- Hits         2301     2300       -1     
  Misses        326      326              
  Partials       29       29              

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

@sungik-choi sungik-choi merged commit c224a4b into channel-io:main Apr 11, 2024
10 checks passed
@sungik-choi sungik-choi deleted the fix/label-override-classname branch April 11, 2024 11:40
sungik-choi pushed a commit that referenced this pull request Apr 11, 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

- Fixes an issue where injecting `className` into `FormLabel`,
`FormHelperText` inside a `FormControl` does not apply styles correctly.
([#2156](#2156)) by
@sungik-choi

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

## @channel.io/[email protected]

### Patch Changes

- Add "color" prefix to alpha color tokens and fix misnaming of alpha
font/typography tokens.
([#2152](#2152)) by
@sungik-choi

## [email protected]

### Patch Changes

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
yangwooseong pushed a commit to yangwooseong/bezier-react that referenced this pull request Apr 12, 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.

- Fixes an issue where injecting `className` into `FormLabel`,
`FormHelperText` inside a `FormControl` does not apply styles correctly.
([channel-io#2156](channel-io#2156)) by
@sungik-choi

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

- Add "color" prefix to alpha color tokens and fix misnaming of alpha
font/typography tokens.
([channel-io#2152](channel-io#2152)) by
@sungik-choi

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
yangwooseong pushed a commit to yangwooseong/bezier-react that referenced this pull request Apr 12, 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.

- Fixes an issue where injecting `className` into `FormLabel`,
`FormHelperText` inside a `FormControl` does not apply styles correctly.
([channel-io#2156](channel-io#2156)) by
@sungik-choi

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

- Add "color" prefix to alpha color tokens and fix misnaming of alpha
font/typography tokens.
([channel-io#2152](channel-io#2152)) by
@sungik-choi

-   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
fix PR related to bug fix
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants