Skip to content

Commit

Permalink
Merge pull request #5120 from systeminit/fix(web)-Change-the-number-o…
Browse files Browse the repository at this point in the history
…f-changesets-and-workspaces-before-search-hits

fix(web): Change the number of changesets and workspaces before search hits
  • Loading branch information
wendybujalski authored Dec 12, 2024
2 parents 3897160 + 6ca36a5 commit ae2025d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/web/src/components/layout/navbar/ChangeSetPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
ref="dropdownMenuRef"
v-model="selectedChangeSetId"
:options="changeSetSearchFilteredOptions"
:search="changeSetDropdownOptions.length > 20"
:search="
changeSetDropdownOptions.length > DEFAULT_DROPDOWN_SEARCH_THRESHOLD
"
placeholder="-- select a change set --"
checkable
variant="navbar"
Expand Down Expand Up @@ -126,6 +128,7 @@ import {
useValidatedInputGroup,
DropdownMenuButton,
DropdownMenuItem,
DEFAULT_DROPDOWN_SEARCH_THRESHOLD,
} from "@si/vue-lib/design-system";
import { useChangeSetsStore } from "@/store/change_sets.store";
import { ChangeSetStatus } from "@/api/sdf/dal/change_set";
Expand Down
5 changes: 4 additions & 1 deletion app/web/src/components/layout/navbar/NavbarPanelLeft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
ref="dropdownMenuRef"
v-model="selectedWorkspacePk"
:options="searchFilteredWorkspaceDropdownOptions"
:search="workspaceDropdownOptions.length > 20"
:search="
workspaceDropdownOptions.length > DEFAULT_DROPDOWN_SEARCH_THRESHOLD
"
placeholder="-- select a workspace --"
checkable
variant="navbar"
Expand Down Expand Up @@ -43,6 +45,7 @@
import * as _ from "lodash-es";
import SiLogo from "@si/vue-lib/brand-assets/si-logo-symbol.svg?component";
import {
DEFAULT_DROPDOWN_SEARCH_THRESHOLD,
DropdownMenuButton,
DropdownMenuItem,
Icon,
Expand Down
1 change: 1 addition & 0 deletions lib/vue-lib/src/design-system/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export { default as DropdownMenu } from "./menus/DropdownMenu.vue";
export type { DropdownMenuItemObjectDef } from "./menus/DropdownMenu.vue";
export { default as DropdownMenuItem } from "./menus/DropdownMenuItem.vue";
export { default as DropdownMenuButton } from "./menus/DropdownMenuButton.vue";
export const DEFAULT_DROPDOWN_SEARCH_THRESHOLD = 10;

// ./modals
export { default as Modal } from "./modals/Modal.vue";
Expand Down

0 comments on commit ae2025d

Please sign in to comment.