From 2ca27ee66ae2a60f039b541c942f0cfeb0795893 Mon Sep 17 00:00:00 2001 From: Lukas Harbarth Date: Tue, 19 May 2026 09:37:10 +0200 Subject: [PATCH] chore(skills): add `analytical-table` maintainer skill --- skills/README.md | 11 +- skills/maintainer/analytical-table/SKILL.md | 200 ++++++++++++ .../analytical-table/evals/evals.json | 35 ++ .../references/HOOK-REFERENCE.md | 220 +++++++++++++ .../references/PERFORMANCE-PATTERNS.md | 158 +++++++++ .../references/REACT-TABLE-PIPELINE.md | 306 ++++++++++++++++++ .../references/STATE-MANAGEMENT.md | 151 +++++++++ 7 files changed, 1078 insertions(+), 3 deletions(-) create mode 100644 skills/maintainer/analytical-table/SKILL.md create mode 100644 skills/maintainer/analytical-table/evals/evals.json create mode 100644 skills/maintainer/analytical-table/references/HOOK-REFERENCE.md create mode 100644 skills/maintainer/analytical-table/references/PERFORMANCE-PATTERNS.md create mode 100644 skills/maintainer/analytical-table/references/REACT-TABLE-PIPELINE.md create mode 100644 skills/maintainer/analytical-table/references/STATE-MANAGEMENT.md diff --git a/skills/README.md b/skills/README.md index 71e8f668481..cf3e1c78723 100644 --- a/skills/README.md +++ b/skills/README.md @@ -6,9 +6,10 @@ This directory contains agent skills for working with this repository. Currently, only **internal skills** for maintainers of this repository are offered. -| Skill | Description | Invocation | -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | -| `ui5wc-upgrade` | Guides a complete `@ui5/webcomponents` version upgrade — updates dependencies, regenerates wrappers, syncs theming parameters, detects new components and breaking changes, and verifies the build. | `/ui5wc-upgrade 2.25.0` | +| Skill | Description | Invocation | +| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `ui5wc-upgrade` | Guides a complete `@ui5/webcomponents` version upgrade — updates dependencies, regenerates wrappers, syncs theming parameters, detects new components and breaking changes, and verifies the build. | `/ui5wc-upgrade 2.25.0` | +| `analytical-table` | Deep expertise on AnalyticalTable internals: vendored react-table v7 plugin pipeline, hook architecture, performance traps, state machine, and accessibility wiring. Closes the gap that the public ui5wc MCP `get_component_api` tool cannot cover. | Auto-triggers when reading or editing files under `packages/main/src/components/AnalyticalTable/` | ### Installing Internal Skills @@ -24,6 +25,10 @@ Alternatively, install from a local checkout: INSTALL_INTERNAL_SKILLS=1 npx skills add ./skills --skill ui5wc-upgrade ``` +### Evaluating Skills + +The `analytical-table` skill ships an `evals/evals.json` file with behavioral test prompts. To run those evaluations against the skill, use the [`skill-creator` skill from Anthropic](https://www.skills.sh/anthropics/skills/skill-creator) (referred to internally as `skill-validator` after a local rename). + ## Requesting New Skills If you use an AI coding agent with UI5 Web Components for React and feel a skill would improve your workflow — whether for component usage, migration, styling, testing, or anything else — we'd love to hear about it. diff --git a/skills/maintainer/analytical-table/SKILL.md b/skills/maintainer/analytical-table/SKILL.md new file mode 100644 index 00000000000..1d719ea10b1 --- /dev/null +++ b/skills/maintainer/analytical-table/SKILL.md @@ -0,0 +1,200 @@ +--- +name: analytical-table +description: Use ALWAYS for AnalyticalTable internals — react-table v7 plugin architecture, vendored react-table code at packages/main/src/components/AnalyticalTable/react-table/, tableHooks, AnalyticalTableHooks, useDynamicColumnWidths, useColumnResizing, useRowSelect, useF2CellEdit, useManualRowSelect, useIndeterminateRowSelection, useOnColumnResize, selectionMode, selectionBehavior, onRowSelect, onRowClick, onRowContextMenu, scaleWidthMode, infiniteScroll, isTreeTable, renderRowSubComponent, columnResizing, dynamic column widths, row virtualization, scroll-to-row freezes, deferred selection events, ARIA roles on grid/treegrid, aria-rowindex under virtualization, custom Cell/Header/Filter/Popover render-prop columns. Apply on ANY task that reads or modifies files under packages/main/src/components/AnalyticalTable/. SKIP for plain prop / event / ref-method / column-property lookups — those are in the ui5-wcr MCP `get_component_api`. +--- + +# AnalyticalTable Expert + +Start with **Key Behaviors** below; jump to a reference file only when its topic comes up. + +## react-table v7 is vendored, not a dependency + +react-table v7 lives at `packages/main/src/components/AnalyticalTable/react-table/` — in-tree, not a node_modules dependency. Imports are relative (`./react-table/index.js`). Grepping `node_modules/react-table` returns nothing — search the vendored tree. For the re-export list, the structure of the vendored copy, and the upstream-fallback path when the in-tree copy doesn't answer a question, see [REACT-TABLE-PIPELINE.md](references/REACT-TABLE-PIPELINE.md). + +--- + +## Key Behaviors + +### autoReset Defaults + +react-table defaults all `autoReset*` options to `true`. Most reset on `data` changes: `autoResetSelectedRows`, `autoResetSortBy`, `autoResetFilters`, `autoResetGlobalFilter`, `autoResetGroupBy`, `autoResetExpanded`, `autoResetHiddenColumns`. The exception is `autoResetResize`, which resets on `columns` changes (not `data`). + +**Not used by AnalyticalTable:** `autoResetPage` (no `usePagination` plugin) and `autoResetRowState` (no `useRowState` plugin) have no effect. + +Hooks that need stable state across data changes (e.g., `useManualRowSelect`) must set `autoResetSelectedRows = false` on the instance. The main `stateReducer` also handles `SET_SELECTED_ROW_IDS` for programmatic overrides. + +### Selection Mechanics + +**UI5 tag blocklist:** `useSingleRowStateSelection` checks `tagNamesWhichShouldNotSelectARow` — a Set of UI5 Web Component tag names (Button, Link, Input, CheckBox, Select, etc.) defined at `util/index.ts:21-56`. Clicking these inside a cell does NOT trigger row selection. The check uses `getTagNameWithoutScopingSuffix(e.target.tagName)` (`packages/main/src/internal/utils.ts:52-55`) so scoped tag names like `ui5-button-foo123` still match. + +**`markerAllowTableRowSelection`:** Checked on both `e` and `e.nativeEvent`. When `true`, overrides the blocklist and allows the click to trigger selection. + +**Native HTML elements** are NOT in the blocklist. A `