Skip to content

feat(DataCollection): Eq filter #1670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

siguenzaraul
Copy link
Contributor

@siguenzaraul siguenzaraul commented Apr 23, 2025

Description

Added a new EqFilter component to the OneDataCollection system that allows users to select exactly one option from a list, with the ability to deselect their choice.

Key Features

  • Single-selection model (one option at a time)
  • Clean UI with checkbox visuals
  • Support for both static and async options
  • Animated transitions for filter chips

Following Existing Patterns

I've carefully matched the existing component structure, maintaining consistency with naming conventions, animations, TypeScript patterns, and general design language.

Perfect for Boolean GraphQL Filters

This component was necessary for building interfaces that connect to GraphQL queries with boolean filters:

{ 
 ats {
  questionTemplatesConnection(
    filter: {
      autoDisqualify: { eq: true }
      mandatory: { eq: false }
    }
  ) {
    nodes {
      id
      label
      ...
    }
  }
 }
}

The EqFilter provides a natural UI for these true/false filters, creating a seamless connection between interface and API.

Use Cases

Ideal for status selectors, boolean filters, type selectors, and any scenario requiring single-option selection from a defined list.

Screenshots (if applicable)

Grabacion.de.pantalla.2025-04-28.a.las.11.49.45.mov
Grabacion.de.pantalla.2025-04-28.a.las.11.51.08.mov
Grabacion.de.pantalla.2025-04-28.a.las.12.17.54.mov

Type of Change

  • New experimental component
  • Promote component from experimental to stable
  • Maintenance / Bug Fix / Other

Copy link
Contributor

github-actions bot commented Apr 23, 2025

🔍 Visual review for your branch is published 🔍

Here are the links to:

@siguenzaraul siguenzaraul self-assigned this Apr 23, 2025
@siguenzaraul siguenzaraul added the enhancement New feature or request label Apr 23, 2025
@siguenzaraul siguenzaraul changed the title feta(DataCollection): Eq filter feat(DataCollection): Eq filter Apr 23, 2025
@siguenzaraul siguenzaraul force-pushed the eq-filter-data-collection branch 2 times, most recently from 4084020 to ba2ca3e Compare April 28, 2025 09:47
@siguenzaraul siguenzaraul force-pushed the eq-filter-data-collection branch from ba2ca3e to 90ebef6 Compare April 28, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant