Filter grouping support to DataViewFilters

Abierto
#735 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@katarinazaprazna ya está trabajando en esto.

Desde el 20/11/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Overview

Insights Inventory binds filters from multiple backend services (Inventory, Advisor, Vulnerability) in the same toolbar. There's no way to communicate to users which filter belongs to which service when using the flat attribute dropdown. Inventory needs the Menu's titled groups of items functionality to be accessible from data-view

Currently, they're using a custom component of DataViewFilters to work around this. The goal is to get the requested changes merged so Inventory can delete their fork

Proposed API

Proposed API (purely additive - all new props are optional):

  interface DataViewFilterGroup {
    id: string;
    label: React.ReactNode;
    filterIds: string[];  // filterIds belonging to this group, in display order
  }

  // added to DataViewFiltersProps:
  groups?: DataViewFilterGroup[];
  groupLabelHeadingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';  // default 'h3'
  ungroupedPosition?: 'start' | 'end';  // default 'start'

Non-breaking requirement: When groups is omitted, the output must be byte-identical to today. No existing consumer can be affected. This is verifiable against PF's own existing snapshot tests - if a snapshot moves, the patch is wrong.

Reference ticket from Insights Inventory: https://redhat.atlassian.net/browse/RHINENG-34064

Acceptance criteria

  • Existing consumers passing no groups see no change in behaviour or DOM
  • Attribute menu shows a labelled heading per group, in groups array order
  • Dividers render between groups, not before the first
  • A group whose filterIds match no children is dropped entirely
  • A filterId listed in two groups appears only in the first
  • Filters not listed in any group render at ungroupedPosition
  • groupLabelHeadingLevel controls the heading element (default h3 — h1 is wrong inside a dropdown)
Lenguaje dominante
TypeScript
Estrellas
4
Forks
21
Merge medio
4 d 9 h
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de patternfly/react-data-view

Todos los issues de patternfly/react-data-view

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.