Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions frontend/src/scenes/max/components/QuestionInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
animation-delay: calc(var(--index) * 25ms);
}

.QuestionInput__textarea.LemonTextArea {
max-height: min(40vh, 20rem);
overflow-y: auto !important;
}

@keyframes QuestionInput__QuestionSuggestion__slide-in-fade-down {
from {
opacity: 0;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/scenes/max/components/QuestionInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ describe('QuestionInput slash command autocomplete', () => {
fireEvent.change(input, { target: { value: '/' } })
await waitFor(() => expect(slashCommandItem()).toBeInTheDocument())
})

it('renders the input with constrained scrolling styles', () => {
expect(screen.getByRole('textbox')).toHaveClass('QuestionInput__textarea')
})
})
2 changes: 1 addition & 1 deletion frontend/src/scenes/max/components/QuestionInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export const QuestionInput = React.forwardRef<HTMLDivElement, QuestionInputProps
minRows={1}
maxRows={10}
className={cn(
'!border-none !bg-transparent min-h-16 py-2 pl-2 resize-none',
'QuestionInput__textarea !border-none !bg-transparent min-h-16 py-2 pl-2 resize-none',
handsFreeFlagEnabled ? 'pr-20' : 'pr-12'
)}
hideFocus
Expand Down