Skip to content

Commit 9e00b3c

Browse files
remove gridcolumn, gridcontainer from search page
1 parent ab67a3d commit 9e00b3c

File tree

1 file changed

+21
-45
lines changed

1 file changed

+21
-45
lines changed

frontends/main/src/page-components/SearchDisplay/SearchDisplay.tsx

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
css,
1212
Drawer,
1313
Stack,
14+
Grid2 as Grid,
1415
} from "ol-components"
1516
import {
1617
Button,
@@ -35,7 +36,6 @@ import {
3536
} from "api"
3637
import { useLearningResourcesSearch } from "api/hooks/learningResources"
3738
import { useAdminSearchParams } from "api/hooks/adminSearchParams"
38-
import { GridColumn, GridContainer } from "@/components/GridLayout/GridLayout"
3939
import {
4040
AvailableFacets,
4141
UseResourceSearchParamsProps,
@@ -367,30 +367,6 @@ const StyledResultsContainer = styled.div<{ fetching: boolean }>(
367367
}),
368368
)
369369

370-
const DesktopFiltersColumn = styled(GridColumn)`
371-
${({ theme }) => theme.breakpoints.down("md")} {
372-
display: none;
373-
}
374-
375-
padding-left: 0 !important;
376-
padding-right: 18px !important;
377-
padding-bottom: 25px;
378-
`
379-
380-
const StyledMainColumn = styled(GridColumn)`
381-
${({ theme }) => theme.breakpoints.up("md")} {
382-
padding-left: 6px !important;
383-
padding-right: 0 !important;
384-
display: flex;
385-
flex-direction: column;
386-
gap: 16px;
387-
}
388-
389-
${({ theme }) => theme.breakpoints.down("md")} {
390-
padding-left: 0 !important;
391-
}
392-
`
393-
394370
const MobileFilter = styled.div`
395371
${({ theme }) => theme.breakpoints.up("md")} {
396372
display: none;
@@ -451,19 +427,6 @@ const MobileFacetsTitleContainer = styled.div`
451427
}
452428
`
453429

454-
const ReversedGridContainer = styled(GridContainer)`
455-
max-width: 1272px !important;
456-
margin-left: 0 !important;
457-
width: 100% !important;
458-
459-
/**
460-
We want the facets to be visually on left, but occur second in the DOM / tab
461-
order. This makes it easier for keyboard navigators to get directly to the
462-
search results.
463-
*/
464-
flex-direction: row-reverse;
465-
`
466-
467430
const ExplanationContainer = styled.div`
468431
${({ theme }) => css({ ...theme.typography.body3 })}
469432
color: ${({ theme }) => theme.custom.colors.silverGrayDark};
@@ -859,9 +822,17 @@ const SearchDisplay: React.FC<SearchDisplayProps> = ({
859822

860823
return (
861824
<Container>
862-
<ReversedGridContainer>
825+
<Grid container columnSpacing="24px" flexDirection="row-reverse">
863826
<ResourceCategoryTabs.Context activeTabName={activeTab.name}>
864-
<StyledMainColumn component="section" variant="main-2">
827+
<Grid
828+
component="section"
829+
size={{ xs: 12, md: 9 }}
830+
sx={{
831+
display: "flex",
832+
flexDirection: "column",
833+
gap: "16px",
834+
}}
835+
>
865836
<VisuallyHidden as={resultsHeadingEl}>
866837
Search Results
867838
</VisuallyHidden>
@@ -984,10 +955,15 @@ const SearchDisplay: React.FC<SearchDisplayProps> = ({
984955
/>
985956
</PaginationContainer>
986957
</ResourceCategoryTabs.TabPanels>
987-
</StyledMainColumn>
988-
<DesktopFiltersColumn
958+
</Grid>
959+
<Grid
989960
component="section"
990-
variant="sidebar-2"
961+
size={{ xs: 12, md: 3 }}
962+
sx={(theme) => ({
963+
[theme.breakpoints.down("md")]: {
964+
display: "none",
965+
},
966+
})}
991967
data-testid="facets-container"
992968
>
993969
<FacetsTitleContainer>
@@ -1009,9 +985,9 @@ const SearchDisplay: React.FC<SearchDisplayProps> = ({
1009985
) : null}
1010986
</FacetsTitleContainer>
1011987
{filterContents}
1012-
</DesktopFiltersColumn>
988+
</Grid>
1013989
</ResourceCategoryTabs.Context>
1014-
</ReversedGridContainer>
990+
</Grid>
1015991
</Container>
1016992
)
1017993
}

0 commit comments

Comments
 (0)