Skip to content

Commit

Permalink
fix: filters in smaller viewport (#23362)
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin authored Jul 1, 2024
1 parent 1bb8ccf commit 3ff87c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions frontend/src/scenes/error-tracking/ErrorTrackingFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const ErrorTrackingFilters = ({ showOrder = true }: { showOrder?: boolean
<RecordingsUniversalFilterGroup />
<UniversalFilters.AddFilterButton type="secondary" size="small" />
</div>
<div className="flex space-x-1 justify-between px-2 py-1.5">
<div className="flex space-x-1">
<div className="flex justify-between px-2 py-1.5 flex-wrap gap-1">
<div className="flex flex-wrap gap-2">
<DateFilter
dateFrom={dateRange.date_from}
dateTo={dateRange.date_to}
Expand Down Expand Up @@ -74,11 +74,11 @@ export const ErrorTrackingFilters = ({ showOrder = true }: { showOrder?: boolean
</div>
<div>
<TestAccountFilter
size="small"
filters={{ filter_test_accounts: filterTestAccounts }}
onChange={({ filter_test_accounts }) => {
setFilterTestAccounts(filter_test_accounts || false)
}}
size="small"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function TestAccountFilter({
id="test-account-filter"
bordered
label={
<div className="flex items-center">
<div className="flex items-center whitespace-nowrap">
<span>Filter out internal and test users</span>
<LemonButton
icon={<IconGear />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const RecordingsUniversalFilters = (): JSX.Element => {

return (
<div className="divide-y bg-bg-light rounded border">
<div className="flex justify-between px-2 py-1.5">
<div className="flex space-x-2">
<div className="flex justify-between px-2 py-1.5 flex-wrap gap-1">
<div className="flex flex-wrap gap-2">
<DateFilter
dateFrom={universalFilters.date_from ?? '-3d'}
dateTo={universalFilters.date_to}
Expand Down Expand Up @@ -57,17 +57,20 @@ export const RecordingsUniversalFilters = (): JSX.Element => {
durationTypeFilter={durationFilter.key}
pageKey="session-recordings"
/>
<TestAccountFilter
filters={universalFilters}
onChange={(testFilters) =>
setUniversalFilters({
...universalFilters,
filter_test_accounts: testFilters.filter_test_accounts,
})
}
/>
<div>
<TestAccountFilter
size="small"
filters={universalFilters}
onChange={(testFilters) =>
setUniversalFilters({
...universalFilters,
filter_test_accounts: testFilters.filter_test_accounts,
})
}
/>
</div>
</div>
<div>
<div className="flex items-center">
<AndOrFilterSelect
value={universalFilters.filter_group.type}
onChange={(type) => {
Expand Down

0 comments on commit 3ff87c1

Please sign in to comment.