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

Writing code to convert spacing foundation #1886

Closed
Tracked by #1800
sungik-choi opened this issue Jan 8, 2024 · 2 comments · Fixed by #1907
Closed
Tracked by #1800

Writing code to convert spacing foundation #1886

sungik-choi opened this issue Jan 8, 2024 · 2 comments · Fixed by #1907
Assignees
Labels
bezier-codemod Issue or PR related to bezier-codemod enhancement Issues or PR related to making existing features better

Comments

@sungik-choi
Copy link
Contributor

sungik-choi commented Jan 8, 2024

  • spacing foundation을 사용하는 프로젝트를 위한 지원
  • CSS variable이 존재하지 않으므로, 해당하는 px값으로 변환
export const Spacing = {
  s1: '2px',
  s2: '4px',
  s3: '6px',
  s4: '8px',
  s5: '12px',
  s6: '16px',
  s7: '20px',
  s8: '24px',
  s9: '30px',
  s10: '44px',
}
@sungik-choi sungik-choi mentioned this issue Jan 8, 2024
@sungik-choi sungik-choi added bezier-codemod Issue or PR related to bezier-codemod enhancement Issues or PR related to making existing features better labels Jan 8, 2024
@yangwooseong yangwooseong self-assigned this Jan 9, 2024
@sungik-choi
Copy link
Contributor Author

단순 px로 변환할지? 아니면 토큰화할지 고민됨.

@sungik-choi
Copy link
Contributor Author

디자이너와 논의 결과, 우선 단순 px로 변환하는 방향이 적합해보입니다. 아직 정해지지 않은 부분이 많고, 토큰 이름도 s1, s2... 같은 방식이 아닌 픽셀값을 따르는 방식이 될 거 같아요.

yangwooseong added a commit that referenced this issue Jan 15, 2024
<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] 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
<!-- Please link to issue if one exists -->

<!-- Fixes #0000 -->

- Fixes #1886 

## Summary
<!-- Please brief explanation of the changes made -->

- spacing 을 px 로 변경하기 위한 codemod와 테스트코드를 추가합니다. 

## Details
<!-- Please elaborate description of the changes -->

- 파일이 변환되었는지 체크하는 로직을 App.tsx 에서 하고 각 transform 에서는 변환만 하고 아무것도 반환하지 않도록
했습니다.

### Breaking change? (Yes/No)
<!-- If Yes, please describe the impact and migration path for users -->

- No

## References
<!-- Please list any other resources or points the reviewer should be
aware of -->

- None
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bezier-codemod Issue or PR related to bezier-codemod enhancement Issues or PR related to making existing features better
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants