Skip to content

Add filtering participation for speakers and companies#499

Merged
Francisca105 merged 1 commit intostagingfrom
francisca105/participation-chip
Nov 3, 2025
Merged

Add filtering participation for speakers and companies#499
Francisca105 merged 1 commit intostagingfrom
francisca105/participation-chip

Conversation

@Francisca105
Copy link
Copy Markdown
Member

Closes #458.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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 useParticipationFilter composable for filtering Map-based participation data
  • Adds a keyboard-accessible ParticipationChip component 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_UP status has an empty string for its background property in participationStatusColor. This will result in an invalid CSS class being generated (just border border-transparent). Consider adding a background color like bg-slate-200 or handling this case explicitly in the chipClass function.
<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.

Comment on lines +142 to +146
key === "ArrowRight" ||
key === "ArrowDown" ||
key === "Right" ||
key === "Down" ||
key === "39"
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +154 to +158
key === "ArrowLeft" ||
key === "ArrowUp" ||
key === "Left" ||
key === "Up" ||
key === "37"
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
) {
if (!chipButtons.value) chipButtons.value = [];
if (el) {
chipButtons.value[idx] = (el as HTMLElement) ?? undefined;
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

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;

Suggested change
chipButtons.value[idx] = (el as HTMLElement) ?? undefined;
chipButtons.value[idx] = el as HTMLElement | undefined;

Copilot uses AI. Check for mistakes.
@Francisca105 Francisca105 self-assigned this Nov 1, 2025
@Francisca105 Francisca105 merged commit 6e8aa58 into staging Nov 3, 2025
7 checks passed
@Francisca105 Francisca105 deleted the francisca105/participation-chip branch November 3, 2025 13:08
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.

2 participants