Files
grafana/i18next.config.ts
Dominik Prokop 91a0b312ed Add faceted labels filter for time series legend (#119918)
* Add faceted labels extraction and filtering utilities

- Add extractFacetedLabels to collect unique label values per key
- Add resolveFacetedFilterNames for OR-within/AND-across filtering
- Add FIELD_NAME_FACET_KEY constant for synthetic name facet
- Extend SeriesVisibilityChangeMode with SetExactly
- Widen onToggleSeriesVisibility signature to accept string[] | null

Made-with: Cursor

* Implement faceted labels filter UI and legend integration

- Add FacetedLabelsFilter component with "By name" and "By labels" sections,
  select/deselect all, expand/collapse, and dimmed state indicator
- Integrate filter into PlotLegend with popover and docked sidebar modes
- Add filterAction prop to VizLegend, VizLegendList, and VizLegendTable
- Add dismissOnScroll prop to Toggletip for scroll-aware popover dismissal
- Enable faceted filter in the TimeSeries panel
- Widen onToggleSeriesVisibility signature in PanelStateWrapper and ExploreGraph
- Update @grafana/scenes to canary with SetExactly support
- Add FacetedLabelsFilter component tests
- Add dev dashboard for faceted labels scenarios

Made-with: Cursor

* Add enableFacetedFilter as timeseries legend option

- Define TimeSeriesLegendOptions extending VizLegendOptions with
  enableFacetedFilter field (defaults to true)
- Add toggle in timeseries panel editor under Legend category
- Remove hardcoded enableFacetedFilter from TimeSeries component,
  let it flow via legend options spread
- Explicitly disable faceted filter in Explore graph
- Update dev dashboard with enableFacetedFilter in legend options
- Regenerate locale files

Made-with: Cursor

* Fix docked filter buttons hidden behind dimmed overlay

- Add zIndex to filterDockedActions so Clear all and Unpin
  buttons render above the dimmed FacetedLabelsFilter

Made-with: Cursor

* Guard faceted labels filter behind feature toggle

- Add vizLegendFacetedFilter experimental toggle in registry.go
- Gate panel editor option in module.tsx behind the toggle
- Gate rendering in TimeSeries.tsx behind the toggle
- Use TimeSeriesLegendOptions type for legend prop

Made-with: Cursor

* Consolidate FacetedLabelsFilter tests

Made-with: Cursor

* Restore limit support in bottom-placement legend

- Revert to InlineList for bottom placement to preserve
  the series limit feature (useLimit + "show all" button)
- filterAction is prepended before InlineList

Made-with: Cursor

* Add test for toggleAllForKey to fix coverage

- Cover Select all / Deselect all button in FacetedLabelsFilter
- Fixes Functions coverage regression for @grafana/dataviz-squad

Made-with: Cursor

* Update dev dashboard file count in search test

- Account for new timeseries-faceted-labels.json dashboard

Made-with: Cursor

* Update search test snapshot for new dev dashboard

- Add timeseries-faceted-labels to t00-all.json snapshot
- Update totalHits from 16 to 17

Made-with: Cursor

* Update search test snapshots for changed BM25 scores

- Adding a dashboard changes maxDocs which shifts IDF values
- Updated scores in all affected snapshot files

Made-with: Cursor

* Add E2E tests for faceted labels filter

- Test filter toggle, popover sections, name selection
- Test select all, clear all, pin to sidebar
- Test dimmed state when legend click conflicts with filter
- Add data-testid attributes to filter toggle and container

Made-with: Cursor

* Use gf-pin icon and move filter to left of name column

- Replace link icon with gf-pin for Pin to sidebar button
- Move filter toggle to left of name column header in table legend

Made-with: Cursor

* Bump @grafana/scenes to 7.1.5

- Replace canary version with stable 7.1.5 release

Made-with: Cursor

* Exclude node_modules from i18n extraction

- Nested node_modules under packages/ can contain .d.ts files
  that fail to parse, causing extraction to exit with error

Made-with: Cursor

* Add unit tests for PlotLegend faceted filter

- Test filter toggle visibility when enabled/disabled
- Test popover interaction and onToggleSeriesVisibility callback
- Test docked mode with clear all and unpin

Made-with: Cursor
2026-03-12 15:57:58 +01:00

21 lines
668 B
TypeScript

import { defineConfig } from 'i18next-cli';
export default defineConfig({
locales: ['en-US'], // Only en-US is updated - Crowdin will PR with other languages
extract: {
ignore: [
'public/lib/monaco/**/*',
'public/app/extensions/**/*',
'public/app/plugins/datasource/**/*',
'packages/*/dist/**/*',
'**/node_modules/**/*',
],
input: ['public/**/*.{tsx,ts}', 'packages/grafana-ui/**/*.{tsx,ts}', 'packages/grafana-data/**/*.{tsx,ts}'],
output: 'public/locales/{{language}}/{{namespace}}.json',
defaultNS: 'grafana',
functions: ['t', '*.t'],
transComponents: ['Trans'],
warnOnConflicts: 'error',
},
});