Skip to content

Honor PivotViewer dimension grouping contracts and localize toolbar copy #334

Description

@woksin

At commit ba9155d, PivotViewer has observable grouping and copy mismatches. Source/PivotViewer/types.ts:66-77 exposes PivotDimension.formatValue and sort, but the rendered grouping path calls the engine with only currentGroupBy (Source/PivotViewer/PivotViewer.tsx:243-245); Source/PivotViewer/engine/store.ts:300-335 emits raw labels and default sorting without those callbacks. Its computeGrouping only handles strings and numbers (engine/store.ts:300-312), and buildIndexes ignores boolean fields (engine/store.ts:145-161), so a boolean dimension produces no groups. buildStore picks the field kind from the first item (engine/store.ts:31-55), so an initial null or undefined can turn a numeric field into strings. Source/PivotViewer/components/Toolbar.tsx:42,94-102,107-147 hardcodes "Sort by", "events", and zoom/filter labels in English; "events" also mislabels non-event collections.

Custom dimension display/order is ignored, some valid data cannot be grouped correctly, and the viewer cannot fully reflect the host language or domain.

Done when

  • Rendered groups honor the declared dimension formatter and comparator, including the worker and fallback paths.
  • Boolean dimensions form groups and sparse first rows do not change the field type incorrectly.
  • Toolbar count and controls use overridable/localizable labels rather than event-specific hardcoding, with focused coverage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions