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(foundation-styled-component): export styleSheetManager #1645

Merged

Conversation

leejiwoo2002
Copy link
Contributor

@leejiwoo2002 leejiwoo2002 commented Sep 25, 2023

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

  • styled-components는 런타임에 css class들을 생성하여 CSSOM에 주입하고 있음
  • 이 때 새로 생긴 window.CSS 객체에 추가되어야 할 내용이 기존 window에 추가되는 현상이 존재했습니다

Details

  • 이를 해결하기 위해 styleSheetManager API를 사용할 수 있도록 export에 추가합니다
    • CSS 트리 생성 방식이 조금 다르다고 안내되고있으며 이 기능을 사용하면 약간의 성능 손해가 있습니다

Breaking change? (Yes/No)

No

References

@leejiwoo2002 leejiwoo2002 added the enhancement Issues or PR related to making existing features better label Sep 25, 2023
@leejiwoo2002 leejiwoo2002 self-assigned this Sep 25, 2023
@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2023

🦋 Changeset detected

Latest commit: 636cdb6

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 Minor
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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2023

Chromatic Report

🚀 Congratulations! Your build was successful!

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03% ⚠️

Comparison is base (5b83d10) 86.96% compared to head (cfd1083) 86.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1645      +/-   ##
==========================================
- Coverage   86.96%   86.94%   -0.03%     
==========================================
  Files         281      281              
  Lines        3882     3883       +1     
  Branches      820      820              
==========================================
  Hits         3376     3376              
- Misses        432      433       +1     
  Partials       74       74              
Files Changed Coverage Δ
...react/src/foundation/FoundationStyledComponent.tsx 87.09% <0.00%> (-2.91%) ⬇️

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

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.

PR 타이틀만 바꿔주시면 좋을 거 같습니다! newWindow 보다, 모듈명(foundation-styled-component)이 들어가는 게 적절할 거 같아요.

@leejiwoo2002 leejiwoo2002 changed the title feat(newWindow): export styleSheetManager feat(foundation-styled-component): export styleSheetManager Sep 25, 2023
@leejiwoo2002
Copy link
Contributor Author

@sungik-choi codecov가 테스트 커버리지 재는 도구같은데, 요 PR에서 해줘야 할 게 있나요?

@sungik-choi
Copy link
Contributor

@sungik-choi codecov가 테스트 커버리지 재는 도구같은데, 요 PR에서 해줘야 할 게 있나요?

없습니다~! 테스트 케이스를 추가하기도 애매해서, Approve 완료되면 수동으로 merge할게요

@sungik-choi sungik-choi merged commit 9e387d7 into channel-io:main Sep 26, 2023
4 of 6 checks passed
sungik-choi pushed a commit that referenced this pull request Sep 26, 2023
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
([#1640](#1640)) by
@kimminkyung94

    **CHANGE**

    -   PageDownload
    -   PageZip
    -   Page

## @channel.io/[email protected]

### Minor Changes

- Added StyleSheetManager to export
([#1645](#1645)) by
@leejiwoo2002

### Patch Changes

- Implement the feature to add scripts by injecting a window object into
the `activate` function of `SmoothCornersFeatures`, if needed.
([#1642](#1642)) by
@sungik-choi

    ```tsx
    SmoothCornersFeature.activate(window);
    ```

## [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
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants