Add filtering participation for speakers and companies#499
Add filtering participation for speakers and companies#499Francisca105 merged 1 commit intostagingfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a participation status filter component to the Members Speakers and Members Companies views, allowing users to filter entities by their participation status.
- Introduces a reusable
useParticipationFiltercomposable for filtering Map-based participation data - Adds a keyboard-accessible
ParticipationChipcomponent with status filters - Integrates the filter into both MembersSpeakers.vue and MembersCompanies.vue
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/composables/useParticipationFilter.ts | New composable that filters a Map of items by participation status |
| frontend/src/components/ParticipationChip.vue | New chip-based filter component with keyboard navigation support |
| frontend/src/components/speakers/MembersSpeakers.vue | Integrates participation filter using the new composable and chip component |
| frontend/src/components/companies/MembersCompanies.vue | Integrates participation filter using the new composable and chip component |
Comments suppressed due to low confidence (2)
frontend/src/components/ParticipationChip.vue:1
- The
GIVEN_UPstatus has an empty string for itsbackgroundproperty inparticipationStatusColor. This will result in an invalid CSS class being generated (justborder border-transparent). Consider adding a background color likebg-slate-200or handling this case explicitly in thechipClassfunction.
<template>
frontend/src/components/ParticipationChip.vue:185
- This expression always evaluates to true.
chipButtons.value[idx] = (el as HTMLElement) ?? undefined;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| key === "ArrowRight" || | ||
| key === "ArrowDown" || | ||
| key === "Right" || | ||
| key === "Down" || | ||
| key === "39" |
There was a problem hiding this comment.
The string '39' is not a valid value for e.key. Modern browsers use 'ArrowRight' for arrow keys, and the fallback 'Right' handles older browsers. Numeric keycodes like 39 should be checked using e.keyCode (though it's deprecated). Remove the string '39' check or use e.keyCode === 39 instead.
| key === "ArrowLeft" || | ||
| key === "ArrowUp" || | ||
| key === "Left" || | ||
| key === "Up" || | ||
| key === "37" |
There was a problem hiding this comment.
The string '37' is not a valid value for e.key. Modern browsers use 'ArrowLeft' for arrow keys, and the fallback 'Left' handles older browsers. Numeric keycodes like 37 should be checked using e.keyCode (though it's deprecated). Remove the string '37' check or use e.keyCode === 37 instead.
| ) { | ||
| if (!chipButtons.value) chipButtons.value = []; | ||
| if (el) { | ||
| chipButtons.value[idx] = (el as HTMLElement) ?? undefined; |
There was a problem hiding this comment.
The nullish coalescing operator ?? undefined is redundant. If el as HTMLElement is nullish, it would already be null or undefined. Simplify to chipButtons.value[idx] = el as HTMLElement | undefined;
| chipButtons.value[idx] = (el as HTMLElement) ?? undefined; | |
| chipButtons.value[idx] = el as HTMLElement | undefined; |
Closes #458.