Skip to content

Improve community filter dropdown on games browse page#291

Open
TarundeepJoshi wants to merge 1 commit into
Playabl-io:mainfrom
TarundeepJoshi:enhancement/community_dropdown
Open

Improve community filter dropdown on games browse page#291
TarundeepJoshi wants to merge 1 commit into
Playabl-io:mainfrom
TarundeepJoshi:enhancement/community_dropdown

Conversation

@TarundeepJoshi

Copy link
Copy Markdown

Summary

Fixes #290

This PR improves the community filter dropdown on the games browse page.

  • Sorts community options alphabetically.
  • Adds search support inside the community dropdown.
  • Prevents the sidebar from expanding when multiple communities are selected.
  • Shows a compact selected state like 3 selected instead of a long comma-separated list.
  • Adds disabled support to the shared FormMultiSelect component.

Testing

  • npm run type-check
  • npm run test -- --run
  • npx eslint src/components/Forms/FormMultiSelect.vue src/pages/GamesBrowse.vue src/layouts/BrowsePageTemplate.vue
  • npm run build

Copilot AI review requested due to automatic review settings July 18, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/pages/GamesBrowse.vue
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));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dropdown for choosing a community is unnecessarily tedious to use.

2 participants