Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch 200 projects for the top bar project picker instead of 20 #1839

Merged
merged 1 commit into from
Dec 7, 2023
Merged
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
7 changes: 5 additions & 2 deletions app/components/TopBarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ const TopBarPicker = (props: TopBarPickerProps) => {
// portal is necessary to avoid the menu popover getting its own after:
// separator thing
<DropdownMenu.Portal>
<DropdownMenu.Content className="mt-2 min-w-[12.8125rem]" align="start">
<DropdownMenu.Content
className="mt-2 max-h-80 min-w-[12.8125rem] overflow-y-auto"
align="start"
>
{props.items.length > 0 ? (
props.items.map(({ label, to }) => {
const isSelected = props.current === label
Expand Down Expand Up @@ -232,7 +235,7 @@ const NoProjectLogo = () => (
)

export function ProjectPicker({ project }: { project?: Project }) {
const { data: projects } = useApiQuery('projectList', { query: { limit: 20 } })
const { data: projects } = useApiQuery('projectList', { query: { limit: 200 } })
const items = (projects?.items || []).map(({ name }) => ({
label: name,
to: pb.instances({ project: name }),
Expand Down
Loading