Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 11, 2025

This PR implements filter chips functionality for the contact search page, addressing the issue where users could only see the number of active filters but not which specific filters were applied.

Filter Chips Implementation

Added a FilterChips component that displays active filters as dismissible badges with theme-aware borders for better visibility. Users can now see exactly which filters are active at a glance and remove individual filters with one click.

Key Features

  • Visual Filter Indication: Active filters are displayed as labeled chips (e.g., "Callsign: W1AW", "Mode: FT8", "Band: 20m")
  • One-Click Removal: Each chip has an X button to remove that specific filter
  • Smart Labeling: Human-readable labels for all filter types including text fields, dropdowns, dates, and DXCC entities
  • Theme-Aware Borders: Chips have visible borders that automatically adapt to light/dark themes using CSS variables
  • Complete Integration: Works with all existing filter types including quick filters, advanced filters, and dropdown selections

Technical Implementation

The implementation uses the existing Badge component with additional styling for theme-responsive borders (border border-border). The getActiveFilterChips() helper function converts filter state into human-readable chip data, handling special cases like date formatting and DXCC entity name resolution.

Demo Page

Created a comprehensive demo at /filter-chips-demo showcasing the functionality with interactive examples, making it easy to test the feature without database setup.

Impact

  • Before: Users saw "5 active" but had to scan form fields to identify which filters were applied
  • After: Users see individual filter chips like "Callsign: W1AW", "Mode: FT8" with clear visual boundaries
  • Improved workflow efficiency for power users managing complex filter combinations
  • Better mobile experience with compact, bordered chip display

Filter Chips with Theme-Aware Borders

The implementation maintains backward compatibility and adds zero breaking changes to existing functionality.

Fixes #65.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Aug 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nodelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 11, 2025 2:29pm

Copilot AI changed the title [WIP] Filter chips showing active filters Add filter chips to show active filters on search contact page Aug 11, 2025
Copilot AI requested a review from patrickrb August 11, 2025 14:13
Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

@copilot the chips are working perfectly, but they dont have a visible border. Lets give it a border, it should be based on the theme the user has selected.

Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot the chips are working perfectly, but they dont have a visible border. Lets give it a border, it should be based on the theme the user has selected.

Added theme-aware borders to the filter chips! The chips now have visible borders using border border-border classes that automatically adapt to the selected theme (light/dark mode). The borders use the theme's CSS variables to ensure they maintain proper contrast and visual consistency.

Filter Chips with Borders

Changes implemented in commit 502d596.

Copilot AI changed the title Add filter chips to show active filters on search contact page Add filter chips with theme-aware borders to show active filters on search contact page Aug 11, 2025
Copilot AI requested a review from patrickrb August 11, 2025 14:29
@patrickrb patrickrb marked this pull request as ready for review August 11, 2025 14:56
Copy link
Owner

@patrickrb patrickrb left a comment

Choose a reason for hiding this comment

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

Chips are working great, Tested on deployed environment. LGTM..merging

@patrickrb patrickrb merged commit df0e8a8 into main Aug 11, 2025
4 checks passed
@patrickrb patrickrb deleted the copilot/fix-65 branch August 11, 2025 15:03
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.

Filter chips showing active filters

2 participants