-
Notifications
You must be signed in to change notification settings - Fork 48
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
Migrate Tooltip
, Help
component with scss
#1862
Merged
yangwooseong
merged 20 commits into
channel-io:alpha
from
yangwooseong:feat/sass/tooltip
Jan 3, 2024
+179
−152
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fba5502
feat(help): migrate styled-components to scss
yangwooseong ac2ca30
chore(help): update snapshot
yangwooseong df7f6b7
feat(tooltip): migrate styled-components to scss
yangwooseong 82ba50b
feat(tooltip): add ThemeProvider to test code, since InvertedThemePro…
yangwooseong 2d1a3ba
feat(tooltip): move ellipsis
yangwooseong 59bebee
refactor(tooltip): use css variable instead of magic number
yangwooseong c7cb6f7
feat(tooltip): change padding to margin of tooltip style
yangwooseong 310b791
fix(tooltip): rm unnecessary interpolation
yangwooseong db69bbe
refactor(test): add AppProvider to TestProvider
yangwooseong f8217ab
feat(tooltip): add 1px margin to Icon in Tooltip
yangwooseong a4efab9
refactor(tooltip): change classname
yangwooseong 7560dc4
feat(text): add multiline ellipsis option to text
yangwooseong c8f45ea
feat(tooltip): use multiline ellipsis of `Text` component
yangwooseong dda40e6
chore(tooltip): change classname to PascalCase
yangwooseong 7f187db
feat(tooltip): use isNumber function, use truncated and multi-line-tr…
yangwooseong 9c7491c
chore(tooltip): enhance JSDoc
yangwooseong 7d066af
feat(tooltip): flat nested selector to lower specificity
yangwooseong ced024d
fix(tooltip): typo fix in classname
yangwooseong 5151cbb
feat(tooltip): change styling of icon, margin to padding
yangwooseong 80da6b1
refactor(text): resolve duplicate css style
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
11 changes: 11 additions & 0 deletions
11
packages/bezier-react/src/components/Help/Help.module.scss
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,11 @@ | ||
@layer components { | ||
.Help { | ||
line-height: 0; | ||
|
||
&:not([data-state="closed"]) { | ||
> .Icon { | ||
color: var(--txt-black-darkest); | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,11 +1,11 @@ | ||
import { | ||
type BezierComponentProps, | ||
type AlphaBezierComponentProps, | ||
type ChildrenProps, | ||
} from '~/src/types/ComponentProps' | ||
|
||
import { type TooltipProps } from '~/src/components/Tooltip' | ||
|
||
export default interface HelpProps extends | ||
BezierComponentProps, | ||
AlphaBezierComponentProps, | ||
ChildrenProps, | ||
Omit<TooltipProps, 'content' | 'children'> {} |
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
30 changes: 30 additions & 0 deletions
30
packages/bezier-react/src/components/Tooltip/Tooltip.module.scss
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,30 @@ | ||
@layer components { | ||
.Tooltip { | ||
z-index: var(--z-index-tooltip); | ||
|
||
box-sizing: border-box; | ||
width: max-content; | ||
max-width: 260px; | ||
height: max-content; | ||
padding: 5px 8px; | ||
word-break: normal; | ||
word-wrap: break-word; | ||
|
||
background-color: var(--bg-white-low); | ||
overflow: hidden; | ||
border-radius: var(--radius-8); | ||
box-shadow: var(--ev-3); | ||
} | ||
|
||
.TooltipContainer { | ||
overflow: hidden; | ||
} | ||
|
||
.TooltipContent { | ||
white-space: pre-wrap; | ||
} | ||
|
||
.Icon { | ||
padding: 1px; | ||
} | ||
} |
63 changes: 0 additions & 63 deletions
63
packages/bezier-react/src/components/Tooltip/Tooltip.styled.ts
This file was deleted.
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.
호버 스타일이 제대로 적용되지 않고 있어요
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.
Icon.styled.ts 에서 만들어진 color 스타일이 unlayered 라서, components 레이어 밑에 있는 tooltip 스타일이 오버라이딩 되고 있던 것이 원인인듯합니다. Icon 컴포넌트 적용사항 반영하니 잘 되네요!
(suggestion 주신 코드에서 & 쓰는 거랑 안쓰는 거랑 차이 없는 걸로 이해했습니다)
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.
👍
.icon
으로 드렸는데, 작성해주신대로.Icon
이 좋을듯..!