Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/strange-readers-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@channel.io/bezier-react": patch
---

- For avoiding text overflow, Change FormControl grid label cell size from flex to fixed.
- For avoiding text overflow, Add 'work-break: break-all' style to FormLabel.
- For avoiding text overflow, Add flex-shrink style to StackItem which is wrapping FormLabel when there is 'help'.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TopHelperTextWrapper = styled(Box)`
export const Grid = styled(Box)`
display: grid;
grid-template-rows: repeat(2, auto);
grid-template-columns: minmax(${LEFT_LABEL_MIN_WIDTH}px, auto) 1fr;
grid-template-columns: ${LEFT_LABEL_MIN_WIDTH}px 1fr;
grid-column-gap: 12px;
align-items: center;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ exports[`FormControl > Snapshot > With multiple field 1`] = `
.c3 {
display: block;
text-align: left;
word-break: break-all;
}

.c8 {
Expand Down Expand Up @@ -322,7 +323,7 @@ exports[`FormControl > Snapshot > With multiple field and left label position 1`
.c1 {
display: grid;
grid-template-rows: repeat(2,auto);
grid-template-columns: minmax(150px,auto) 1fr;
grid-template-columns: 150px 1fr;
grid-column-gap: 12px;
-webkit-align-items: center;
-webkit-box-align: center;
Expand Down Expand Up @@ -447,6 +448,7 @@ exports[`FormControl > Snapshot > With multiple field and left label position 1`
.c4 {
display: block;
text-align: left;
word-break: break-all;
}

.c11 {
Expand Down Expand Up @@ -711,6 +713,7 @@ exports[`FormControl > Snapshot > With single field 1`] = `
.c3 {
display: block;
text-align: left;
word-break: break-all;
}

.c5 {
Expand Down Expand Up @@ -833,7 +836,7 @@ exports[`FormControl > Snapshot > With single field and left label position 1`]
.c1 {
display: grid;
grid-template-rows: repeat(2,auto);
grid-template-columns: minmax(150px,auto) 1fr;
grid-template-columns: 150px 1fr;
grid-column-gap: 12px;
-webkit-align-items: center;
-webkit-box-align: center;
Expand Down Expand Up @@ -900,6 +903,7 @@ exports[`FormControl > Snapshot > With single field and left label position 1`]
.c4 {
display: block;
text-align: left;
word-break: break-all;
}

.c6 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import { Text } from 'Components/Text'
export const Label = styled(Text)`
display: block;
text-align: left;
word-break: break-all;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break-all은 영어의 경우에 어색해서 기피하는 것 같던데, 언어 specific한 고려를 bezier에서 하는 것도 어색해서 고민이네요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#924 와 시안을 고려해봤을 때 break-word 로 변경하는 게 적절해보입니다.

`
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ forwardedRef: React.Ref<HTMLLabelElement>,
? LabelComponent
: (
<HStack align="center" spacing={6}>
<StackItem>
<StackItem shrink weight={1}>
{ LabelComponent }
</StackItem>
<StackItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`FormLabel > Snapshot > 1`] = `
.c1 {
display: block;
text-align: left;
word-break: break-all;
}

<label
Expand Down