chore(aggrid): deprecate AGGrid in favor of DataVis NITRO - #385
Conversation
- @deprecated JSDoc on component, barrel, and ag-grid entry - warn-once console.warn on first mount for all consumers - move stories to bottom "Deprecated" sidebar section with warning banner - docs sweep: README, CONTRIBUTING, MAINTAINERS, component-policy - update visual test story ID (baseline needs regen)
There was a problem hiding this comment.
Pull request overview
This PR soft-deprecates the AGGrid component across @mieweb/ui in favor of DataVis NITRO (@mieweb/ui/datavis), adding editor-visible @deprecated annotations, a runtime warn-once message, and Storybook/docs updates to steer usage away from AGGrid while keeping existing consumers working.
Changes:
- Added
@deprecatedJSDoc to AGGrid entry points/exports and a warn-onceconsole.warnon first mount. - Moved AGGrid Storybook stories under a “Deprecated/…” section and added a shared deprecation banner decorator + docs callout.
- Updated docs/guides and the visual regression test story ID for AGGrid.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/visual/components.spec.ts | Updates AGGrid visual test to target the new Deprecated story ID. |
| src/components/AGGrid/MAINTAINERS.md | Updates maintainer guidance to reflect deprecation + no-new-usages policy. |
| src/components/AGGrid/index.ts | Adds module-level @deprecated JSDoc for the AGGrid barrel. |
| src/components/AGGrid/DeprecationBanner.tsx | Introduces shared Storybook decorator/banner + markdown notice. |
| src/components/AGGrid/AGGrid.tsx | Adds warn-once deprecation warning and @deprecated tags on the component/export. |
| src/components/AGGrid/AGGrid.stories.tsx | Retitles story path under Deprecated and injects banner + docs notice. |
| src/components/AGGrid/AGGrid.enhanced.stories.tsx | Same as above for Enhanced stories. |
| src/ag-grid.ts | Adds @deprecated notice to the AG Grid entry point docblock. |
| README.md | Marks AG Grid entry point as deprecated and adds a deprecation callout. |
| lessons/component-policy.md | Updates component policy guidance to prefer DataVisNITRO; marks AGGrid deprecated. |
| CONTRIBUTING.md | Updates contributor guidance to reflect AGGrid deprecation and reformats tables. |
| .storybook/preview.tsx | Adjusts storySort ordering to pin Deprecated section at the bottom. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Deploying ui with
|
| Latest commit: |
a069079
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3e8d7bd6.ui-6d0.pages.dev |
| Branch Preview URL: | https://chore-deprecate-ag-grid.ui-6d0.pages.dev |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/components/AGGrid/index.ts:6
- The new
@deprecatedJSDoc only attaches to the first re-export statement (export { AGGrid, AgGridReact } ...). The subsequentexport type { ... }andexport { ... } from './CellRenderers'statements won’t be marked deprecated in TS/IDE tooling, so consumers importingColDef, cell renderers, etc. won’t see the deprecation signal even though this module is intended to be fully deprecated.
/**
* @deprecated AGGrid is deprecated — use DataVis NITRO (`@mieweb/ui/datavis`)
* for all tables. This module will be removed in a future major release.
*/
export { AGGrid, AgGridReact } from './AGGrid';
export type {
- console.warn now skipped when NODE_ENV=production (dead-code-eliminated) - add `process` to eslint globals
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/components/AGGrid/DeprecationBanner.tsx:21
- The deprecation messaging is duplicated and slightly inconsistent between
DEPRECATION_NOTICE(includes the “removed in a future major release” note) and theAlertDescriptionbanner text (does not). This can drift over time and confuse readers if the banner and docs communicate different deprecation expectations. Consider extracting shared copy (or at least keeping both messages semantically identical).
<AlertDescription>
AGGrid is deprecated. Use DataVis NITRO (<code>@mieweb/ui/datavis</code>
) for all tables.
</AlertDescription>
src/components/AGGrid/AGGrid.tsx:146
warnDeprecatedOncereadsprocess.env.NODE_ENVunguarded. If this module is executed in an environment whereprocess(orprocess.env) is not defined (e.g. browser runtimes without a bundler define/polyfill), calling this effect will throw aReferenceErrorand break AGGrid rendering. Guard the access with atypeof process !== 'undefined'/typeof process.env !== 'undefined'check so the warning remains dev-only without relying onprocessbeing present at runtime.
function warnDeprecatedOnce() {
if (process.env.NODE_ENV === 'production' || didWarnDeprecated) return;
didWarnDeprecated = true;
Summary
Soft-deprecates AGGrid across the package. DataVis NITRO (
@mieweb/ui/datavis) is now the grid for all tables. Fully non-breaking — exports map, tsup config, and peer deps are unchanged; existing consumers keep working.Changes
Code
@deprecatedJSDoc on theAGGridcomponent, its export, thesrc/components/AGGridbarrel, and thesrc/ag-grid.tsentry — editors show strikethrough on all usages.console.warnon first mount, dev builds only (skipped whenNODE_ENV=production; bundlers dead-code-eliminate the branch from prod bundles):Storybook
Deprecated/AGGridandDeprecated/AGGrid/Enhanced— the Deprecated section is pinned to the very bottom of the sidebar viastorySort.withDeprecationBannerdecorator renders anAlert variant="warning"banner above every story; the same notice leads both autodocs pages.Docs
Tests
deprecated-aggrid--default;aggrid-default.pngbaseline regenerated with the banner.Verification
pnpm typecheck✅ · eslint ✅ · prettier ✅ · visual test passes against new baseline ✅