-
Notifications
You must be signed in to change notification settings - Fork 47
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
Convert enum type of component props to string literal type - Toast, Tooltip, etc #1990
Merged
yangwooseong
merged 24 commits into
channel-io:alpha
from
yangwooseong:enum-member-to-string-literal-2
Feb 13, 2024
Merged
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c7530b9
feat(codemod): comment import declaration check for internal use
yangwooseong 6b84364
feat(modal): convert `ModalTitleSize` enum to string literal
yangwooseong 8d91d9d
feat(toast): convert `ToastPlacement`, `ToastAppearnce`, `ToastPreset…
yangwooseong ed90814
feat(spinner): convert `SpinnerSize` enum to string literal
yangwooseong 704896d
feat(spinner): rm deprecated `SpinnerThickness` prop
yangwooseong 21e25e4
feat(switch): rm deprecated `SwitchSize` prop
yangwooseong ab173a9
feat(tooltip): convert `TooltipPosition` enum to string literal
yangwooseong f417e15
feat(overlay): conver `OverlayPosition` enum to string literal
yangwooseong 2135073
feat(progress-bar): deprecate `ProgressBarSize`, `ProgressBarVariant`…
yangwooseong 4217ad3
feat(legacy-tooltip): convert `LegacyTooltipPosition` enum to string …
yangwooseong 43a716c
feat(text-field): convert `TextFieldSize`, `TextFieldVariant` enum t…
yangwooseong 9e7dbf7
feat(tag-badge): convert `TagBadgeSize`, `TagBadgeVariant` enum to s…
yangwooseong 06edcf6
feat(icon): convert `IconSize` enum to string literal
yangwooseong aa75892
feat(text-area): convert `TextAreaHeight` enum to number literal
yangwooseong 4cc7cc7
feat(avatar-group): convert `AvatarGroupEllipsisType` enum to string …
yangwooseong cac5dd9
Revert "feat(codemod): comment import declaration check for internal …
yangwooseong 622891d
feat(codemod): resolve typecheck error
yangwooseong b6b310f
feat(storybook): rm unused util
yangwooseong 81f7b7d
chore(changeset): add
yangwooseong cfff23b
chore(storybook): resolve runtime error caused by using dead code
yangwooseong 814b551
chore: check in jsdoc
yangwooseong 8530787
chore(badge): update snapshot
yangwooseong 8dd616d
feat(storybook): rm utils/story path from tsconfig
yangwooseong 297b174
feat(icon): change normal to m
yangwooseong 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 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,25 @@ | ||
--- | ||
"@channel.io/bezier-react": major | ||
--- | ||
|
||
**Breaking Changes: The enum type that the component receives as props is changed to a string (or number) literal type** | ||
|
||
The properties that change are: | ||
|
||
- `AvatarGroupEllipsisType` | ||
- `IconSize` | ||
- `LegacyTooltipPosition` | ||
- `ModalTitleSize` | ||
- `OverlayPosition` | ||
- `ProgressBarSize`, `ProgressBarVariant` | ||
- `SpinnerSize` | ||
- `SwitchSize` | ||
- `TagBadgeSize`, `TagBadgeVariant` | ||
- `TextAreaHeight` | ||
- `TextFieldSize`, `TextFieldVariant` | ||
- `ToastPlacement`, `ToastAppearance`, `ToastPreset` | ||
- `TooltipPosition` | ||
|
||
Also, `SpinnerThickness` props of `Spinner` is not supported any more. | ||
|
||
When changed to string literal type, it is changed to the kebab-cased value of enum. e.g. `TooltipPosition.TopCenter` -> `top-center`. Among the above enums, `TextAreaHeight` is converted to number literal type. e.g. `TextAreaHeight.Row16` -> `16` |
This file contains 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,19 @@ | ||
--- | ||
"@channel.io/bezier-codemod": minor | ||
--- | ||
|
||
Add more various cases to `v2-enum-member-to-string-literal`. Now it covers following enums. | ||
|
||
- `AvatarGroupEllipsisType` | ||
- `IconSize` | ||
- `LegacyTooltipPosition` | ||
- `ModalTitleSize` | ||
- `OverlayPosition` | ||
- `ProgressBarSize`, `ProgressBarVariant` | ||
- `SpinnerSize` | ||
- `SwitchSize` | ||
- `TagBadgeSize`, `TagBadgeVariant` | ||
- `TextAreaHeight` | ||
- `TextFieldSize`, `TextFieldVariant` | ||
- `ToastPlacement`, `ToastAppearance`, `ToastPreset` | ||
- `TooltipPosition` |
This file contains 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { AvatarGroup } from './AvatarGroup' | ||
export { | ||
AvatarGroupEllipsisType, | ||
type AvatarGroupEllipsisType, | ||
type AvatarGroupProps, | ||
} from './AvatarGroup.types' |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이번 기회에 피그마와 동일하게
m
으로 맞추면 좋을 거 같아요