Skip to content

chore(aggrid): deprecate AGGrid in favor of DataVis NITRO - #385

Merged
garrity-miepub merged 3 commits into
mainfrom
chore/deprecate-ag-grid
Aug 20, 2026
Merged

chore(aggrid): deprecate AGGrid in favor of DataVis NITRO#385
garrity-miepub merged 3 commits into
mainfrom
chore/deprecate-ag-grid

Conversation

@garrity-miepub

@garrity-miepub garrity-miepub commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

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

  • @deprecated JSDoc on the AGGrid component, its export, the src/components/AGGrid barrel, and the src/ag-grid.ts entry — editors show strikethrough on all usages.
  • Warn-once console.warn on first mount, dev builds only (skipped when NODE_ENV=production; bundlers dead-code-eliminate the branch from prod bundles):
    [@mieweb/ui] AGGrid is deprecated. Use DataVis NITRO (@mieweb/ui/datavis) for all tables.
    

Storybook

  • Story pages kept, but retitled Deprecated/AGGrid and Deprecated/AGGrid/Enhanced — the Deprecated section is pinned to the very bottom of the sidebar via storySort.
  • New shared withDeprecationBanner decorator renders an Alert variant="warning" banner above every story; the same notice leads both autodocs pages.

Docs

  • README add-ons table row marked deprecated + callout.
  • CONTRIBUTING grid guidance upgraded from "prefer NITRO" to "deprecated — no new usages".
  • AGGrid MAINTAINERS.md: "⚠️ DEPRECATED — no new usages".
  • lessons/component-policy.md Data Grids row updated.

Tests

  • Visual test story ID updated to deprecated-aggrid--default; aggrid-default.png baseline regenerated with the banner.

Verification

  • pnpm typecheck ✅ · eslint ✅ · prettier ✅ · visual test passes against new baseline ✅
  • Verified live in Storybook: Deprecated section renders last in sidebar, banner shows on stories, console warning fires exactly once on first grid mount in dev.

- @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)
Copilot AI lite review requested due to automatic review settings August 20, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @deprecated JSDoc to AGGrid entry points/exports and a warn-once console.warn on 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.

Comment thread tests/visual/components.spec.ts
Comment thread src/components/AGGrid/DeprecationBanner.tsx
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploying ui with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copilot AI review requested due to automatic review settings August 20, 2026 22:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @deprecated JSDoc only attaches to the first re-export statement (export { AGGrid, AgGridReact } ...). The subsequent export type { ... } and export { ... } from './CellRenderers' statements won’t be marked deprecated in TS/IDE tooling, so consumers importing ColDef, 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
Copilot AI review requested due to automatic review settings August 20, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the AlertDescription banner 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

  • warnDeprecatedOnce reads process.env.NODE_ENV unguarded. If this module is executed in an environment where process (or process.env) is not defined (e.g. browser runtimes without a bundler define/polyfill), calling this effect will throw a ReferenceError and break AGGrid rendering. Guard the access with a typeof process !== 'undefined' / typeof process.env !== 'undefined' check so the warning remains dev-only without relying on process being present at runtime.
function warnDeprecatedOnce() {
  if (process.env.NODE_ENV === 'production' || didWarnDeprecated) return;
  didWarnDeprecated = true;

@garrity-miepub
garrity-miepub merged commit e1951c0 into main Aug 20, 2026
11 checks passed
@garrity-miepub
garrity-miepub deleted the chore/deprecate-ag-grid branch August 20, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants