Skip to content

Commit

Permalink
refactor: prepare for moving scrollbar into result listings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Dec 10, 2024
1 parent 29a3aa4 commit edc37e9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/[locale]/languages/[language]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import { useTranslations } from "next-intl";

import { SingleRefinementList } from "@/components/instantsearch/single-refinement-list";
import { InstantSearchView } from "@/components/instantsearch-view";
import { MainContent } from "@/components/main-content";
import { SingleRefinementList } from "@/components/single-refinement-list";

interface LanguagesPageProps {
params?: {
Expand Down
2 changes: 1 addition & 1 deletion app/[locale]/translators/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { useTranslations } from "next-intl";
import { useMenu } from "react-instantsearch";

import { InstantSearchProvider } from "@/components/instantsearch/instantsearchprovider";
import { SingleRefinementDropdown } from "@/components/instantsearch/single-refinement-dropdown";
import { MainContent } from "@/components/main-content";
import { SingleRefinementDropdown } from "@/components/single-refinement-dropdown";
import { TranslatorLink } from "@/components/translator-link";

function TranslatorsList() {
Expand Down
4 changes: 1 addition & 3 deletions components/app-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ interface AppLayoutProps {
export function AppLayout(props: AppLayoutProps): ReactNode {
const { children } = props;

return (
<div className="relative isolate grid min-h-full grid-rows-[auto_1fr_auto]">{children}</div>
);
return <div className="relative isolate grid h-full grid-rows-[auto_1fr_auto]">{children}</div>;
}
2 changes: 1 addition & 1 deletion components/instantsearch-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { SearchBox } from "react-instantsearch";
import { InfiniteScroll } from "./instantsearch/infinitescroll";
import { InstantSearchProvider } from "./instantsearch/instantsearchprovider";
import { PaginatedTable } from "./instantsearch/paginated-table";
import { SingleRefinementDropdown } from "./instantsearch/single-refinement-dropdown";
import { InstantSearchSortBy } from "./instantsearch/sortby";
import { InstantSearchStats } from "./instantsearch/stats";
import { SingleRefinementDropdown } from "./single-refinement-dropdown";

interface InstantSearchProps {
queryArgsToMenuFields: Record<string, string>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { RefinementListItem } from "instantsearch.js/es/connectors/refineme
import { Label } from "react-aria-components";
import { useMenu, type UseMenuProps } from "react-instantsearch";

import { Select, SelectContent, SelectItem, SelectPopover, SelectTrigger } from "./ui/select";
import { Select, SelectContent, SelectItem, SelectPopover, SelectTrigger } from "../ui/select";

interface SingleRefinementDropdownProps {
attribute: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function SingleRefinementList(props: SingleRefinementListProps) {
});

return (
<div className="sticky top-0 grid max-h-screen grid-rows-[auto_1fr]">
<div className="mr-10 grid h-full grid-rows-[auto_1fr]">
{props.allLabel ? (
<div className="px-2">
<label
Expand Down Expand Up @@ -59,7 +59,7 @@ export function SingleRefinementList(props: SingleRefinementListProps) {
</label>
</div>
) : null}
<div className="my-2 overflow-y-auto px-2">
<div className="my-2 h-full px-2">
{items.map((item) => {
return (
<label
Expand Down
2 changes: 1 addition & 1 deletion components/publication-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface PublicationGridProps {

export function PublicationGrid(props: PublicationGridProps): ReactNode {
return (
<ol className="m-4 grid h-fit grid-cols-1 justify-items-center md:grid-cols-4">
<ol className="m-4 grid grid-cols-1 justify-items-center md:grid-cols-4">
{props.publications.map((pub) => {
return (
<li key={pub.id} className="m-4 block size-44">
Expand Down

0 comments on commit edc37e9

Please sign in to comment.