-
Notifications
You must be signed in to change notification settings - Fork 1
fix: (JDS) Divider dashed 간격 수정 #709
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
affcdf2
fix: (JDS) Divider dashed 대시를 6px 선, 6px 간격으로 고정
ccconac 6140945
fix: (JDS) Divider dashLength, dashGap에 하한 적용
ccconac 60a4545
fix: (JDS) 강제 색상 모드에서 Divider를 border로 그림
ccconac 280de17
chore: (JDS) Divider의 참조되지 않는 DEFAULT_DASH_LENGTH export 제거
ccconac 90d9df3
chore: (JDS) Divider 체인지셋 추가
ccconac bdb86ab
chore: (JDS) Divider 스토리를 API 축별로 하나씩만 남김
ccconac e19e874
chore(vrt): CI에서 baseline 재생성
github-actions[bot] f8a44cc
refactor: (JDS) Divider props 유니온 멤버를 interface로 분리
ccconac e9de510
fix: (JDS) dashed Divider가 하한 보정으로 실선이 되지 않도록 수정
ccconac 8294d5b
Merge branch 'fix/701-divider' of https://github.com/JECT-Study/JECT-…
ccconac e33e674
Merge branch 'dev' into fix/701-divider
ccconac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| "@jects/jds": minor | ||
| --- | ||
|
|
||
| **Divider** | ||
|
|
||
| `variant="dashed"`의 대시가 6px 선, 6px 간격으로 그려집니다. 이전에는 브라우저가 대시 길이를 정했습니다. `DividerProps`가 `variant` 값에 따라 갈리는 유니온 타입이 되었고, 선이 `border`가 아닌 `background`로 그려집니다. | ||
|
|
||
| **소비처 영향 (코드 수정 필요)** | ||
|
|
||
| | AS-IS | TO-BE | | ||
| | ------------------------------------------ | ------------------------------------------ | | ||
| | `interface X extends DividerProps { ... }` | `type X = DividerProps & { ... }` | | ||
| | `border`로 선 두께나 색을 덮어쓰기 | `thickness` prop, `dividerColorVar`로 지정 | | ||
|
|
||
| `DividerProps`를 확장하던 타입은 교차 타입으로 바꿉니다. | ||
|
|
||
| ```diff | ||
| -interface MyDividerProps extends DividerProps { | ||
| - spacing?: number; | ||
| -} | ||
| +type MyDividerProps = DividerProps & { | ||
| + spacing?: number; | ||
| +}; | ||
| ``` | ||
|
|
||
| `border`로 선을 덮어쓰던 스타일은 제거합니다. 기본 선을 대체하지 않고 겹쳐 그려지며, 요소 높이가 `thickness`만큼 늘어납니다. | ||
|
|
||
| ```diff | ||
| -<Divider className='border-t-2 border-red-500' /> | ||
| +<Divider thickness='bold' /> | ||
| ``` | ||
|
|
||
| `dashLength`와 `dashGap`은 `variant="dashed"`를 함께 지정해야 쓸 수 있습니다. | ||
|
|
||
| **추가** | ||
|
|
||
| - `dashLength` — 점선 한 칸의 길이(px), 기본값 `6`, 최솟값 `1` | ||
| - `dashGap` — 점선 사이 간격(px), 지정하지 않으면 하한이 적용된 `dashLength`를 따라감, 최솟값 `1` | ||
|
|
||
| ```tsx | ||
| <Divider variant='dashed' /> // 6 / 6 | ||
| <Divider variant='dashed' dashLength={2} /> // 2 / 2 | ||
| <Divider variant='dashed' dashLength={2} dashGap={6} /> // 2 / 6 | ||
| ``` | ||
|
|
||
| **동작 변경 (코드 수정 불필요)** | ||
|
|
||
| - 강제 색상 모드(`forced-colors: active`)에서 `dashLength`와 `dashGap`이 반영되지 않음, 브라우저가 정한 대시가 적용됨 | ||
| - `dividerColorVar`로 색을 덮어쓰는 방식은 그대로 동작 | ||
| - `orientation`, `thickness`, `variant`와 렌더 엘리먼트, `role`은 변경 없음 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-753 Bytes
(85%)
...ference/jds-vrt_components-divider--all-variants_0_storybook-root_0_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.1 KB
...ference/jds-vrt_components-divider--dash-spacing_0_storybook-root_0_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-10.7 KB
...rence/jds-vrt_components-divider--dashed-divider_0_storybook-root_0_desktop.png
Binary file not shown.
Binary file removed
BIN
-6.98 KB
...e/jds-vrt_components-divider--horizontal-divider_0_storybook-root_0_desktop.png
Binary file not shown.
Binary file removed
BIN
-7.94 KB
...ps_reference/jds-vrt_components-divider--in-card_0_storybook-root_0_desktop.png
Binary file not shown.
Binary file removed
BIN
-7.34 KB
...rence/jds-vrt_components-divider--in-flex-layout_0_storybook-root_0_desktop.png
Binary file not shown.
Binary file removed
BIN
-15.6 KB
...eference/jds-vrt_components-divider--style-guide_0_storybook-root_0_desktop.png
Binary file not shown.
Binary file modified
BIN
+1.28 KB
(130%)
...nce/jds-vrt_components-divider--vertical-divider_0_storybook-root_0_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.