Filter grouping support to DataViewFilters

オープン
#735 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@katarinazaprazna がすでに取り組んでいます。

2026年11月20日 から。

評価

この issue はまだ評価されていません。

説明

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)
主要言語
TypeScript
スター
4
フォーク
21
平均マージ
4日 9時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

patternfly/react-data-view のほかの issue

patternfly/react-data-view の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。