Improve community filter dropdown on games browse page#291
Open
TarundeepJoshi wants to merge 1 commit into
Open
Improve community filter dropdown on games browse page#291TarundeepJoshi wants to merge 1 commit into
TarundeepJoshi wants to merge 1 commit into
Conversation
…tions and improved layout
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #290 by improving the usability of the community filter on the games browse page, making it easier to find and select communities as the list grows.
Changes:
- Adds search support and a compact selected-state label to the shared
FormMultiSelect(including disabled support). - Ensures community options are presented alphabetically for the Games Browse filter.
- Prevents the browse sidebar/content area from expanding horizontally when selections grow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/pages/GamesBrowse.vue |
Adds searchable community dropdown and orders community options alphabetically. |
src/layouts/BrowsePageTemplate.vue |
Adds min-w-0 constraints to prevent layout expansion when filter content grows. |
src/components/Forms/FormMultiSelect.vue |
Adds searchable UI, compact selection labeling, and disabled support to the multi-select component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+31
to
+46
| <div v-if="searchable" class="sticky top-0 z-10 bg-white pb-2"> | ||
| <div class="relative"> | ||
| <MagnifyingGlassIcon | ||
| class="pointer-events-none absolute left-2 top-2.5 h-4 w-4 text-slate-400" | ||
| aria-hidden="true" | ||
| /> | ||
| <input | ||
| v-model="searchQuery" | ||
| type="search" | ||
| class="h-9 w-full rounded-md border border-solid border-gray-300 py-2 pl-8 pr-2 text-sm text-slate-900 focus-styles" | ||
| :placeholder="searchPlaceholder" | ||
| @click.stop | ||
| @keydown.stop | ||
| /> | ||
| </div> | ||
| </div> |
| class="h-9 w-full rounded-md border border-solid border-gray-300 py-2 pl-8 pr-2 text-sm text-slate-900 focus-styles" | ||
| :placeholder="searchPlaceholder" | ||
| @click.stop | ||
| @keydown.stop |
Comment on lines
+72
to
+77
| <p | ||
| v-if="filteredOptions.length === 0" | ||
| class="p-2 text-sm text-slate-600" | ||
| > | ||
| No options found | ||
| </p> |
Comment on lines
+144
to
+156
| const selectedLabel = computed(() => { | ||
| const selectedOptions = props.modelValue | ||
| .map((value) => props.options.find((option) => option.value === value)) | ||
| .filter(Boolean); | ||
|
|
||
| if (selectedOptions.length === 0) { | ||
| return props.label; | ||
| } | ||
| if (selectedOptions.length === 1) { | ||
| return selectedOptions[0]?.label; | ||
| } | ||
| return `${selectedOptions.length} selected`; | ||
| }); |
Comment on lines
+204
to
+209
| communityOptions.value = data | ||
| .map((record) => ({ | ||
| label: record.name, | ||
| value: record.id, | ||
| })) | ||
| .sort((a, b) => a.label.localeCompare(b.label)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #290
This PR improves the community filter dropdown on the games browse page.
3 selectedinstead of a long comma-separated list.FormMultiSelectcomponent.Testing
npm run type-checknpm run test -- --runnpx eslint src/components/Forms/FormMultiSelect.vue src/pages/GamesBrowse.vue src/layouts/BrowsePageTemplate.vuenpm run build