Skip to content

Commit d43106a

Browse files
committed
Rename max_rows_when_not_focused to max_rows_when_collapsed across all components and stories
1 parent 85f0ac1 commit d43106a

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/ui/src/components/editor/common/Textarea/Textarea.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const WithValue = () => {
3333
)
3434
}
3535

36-
export const WithMaxRowsWhenNotFocused = () => {
36+
export const WithMaxRowsWhenCollapsed = () => {
3737
const [value, set_value] = useState(
3838
'This is a long text that should be truncated when not focused.\nLine 2\nLine 3\nLine 4\nLine 5'
3939
)
@@ -45,7 +45,7 @@ export const WithMaxRowsWhenNotFocused = () => {
4545
placeholder="Will be ignored because value is set"
4646
min_rows={1}
4747
max_rows={10}
48-
max_rows_when_not_focused={2}
48+
max_rows_when_collapsed={2}
4949
/>
5050
)
5151
}

‎packages/ui/src/components/editor/common/Textarea/Textarea.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Props = {
99
autofocus?: boolean
1010
min_rows?: number
1111
max_rows?: number
12-
max_rows_when_not_focused?: number
12+
max_rows_when_collapsed?: number
1313
on_change: (value: string) => void
1414
on_blur?: () => void
1515
on_key_down?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void
@@ -62,7 +62,7 @@ export const Textarea = React.forwardRef<HTMLTextAreaElement, Props>(
6262

6363
const max_rows = has_been_focused
6464
? props.max_rows
65-
: (props.max_rows_when_not_focused ?? props.max_rows)
65+
: (props.max_rows_when_collapsed ?? props.max_rows)
6666

6767
return (
6868
<TextareaAutosize

‎packages/vscode/src/views/settings/frontend/Home/sections/GeneralSection.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
170170
<Textarea
171171
value={instructions.whole}
172172
min_rows={3}
173-
max_rows_when_not_focused={3}
173+
max_rows_when_collapsed={3}
174174
on_change={(value) =>
175175
set_instructions((prev) => ({ ...prev, whole: value }))
176176
}
@@ -186,7 +186,7 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
186186
<Textarea
187187
value={instructions.truncated}
188188
min_rows={3}
189-
max_rows_when_not_focused={3}
189+
max_rows_when_collapsed={3}
190190
on_change={(value) =>
191191
set_instructions((prev) => ({ ...prev, truncated: value }))
192192
}
@@ -202,7 +202,7 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
202202
<Textarea
203203
value={instructions.before_after}
204204
min_rows={3}
205-
max_rows_when_not_focused={3}
205+
max_rows_when_collapsed={3}
206206
on_change={(value) =>
207207
set_instructions((prev) => ({ ...prev, before_after: value }))
208208
}
@@ -218,7 +218,7 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
218218
<Textarea
219219
value={instructions.diff}
220220
min_rows={3}
221-
max_rows_when_not_focused={3}
221+
max_rows_when_collapsed={3}
222222
on_change={(value) =>
223223
set_instructions((prev) => ({ ...prev, diff: value }))
224224
}

0 commit comments

Comments
 (0)