Skip to content

Deprecate Flash component in primer/react - #8306

Open
llastflowers wants to merge 6 commits into
mainfrom
llastflowers/5437/deprecate-flash
Open

Deprecate Flash component in primer/react#8306
llastflowers wants to merge 6 commits into
mainfrom
llastflowers/5437/deprecate-flash

Conversation

@llastflowers

Copy link
Copy Markdown
Contributor

Relates to https://github.com/github/primer/issues/5437

Changelog

Changed

Deprecate the Flash component and move to @primer/react/deprecated

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Copilot AI lite review requested due to automatic review settings August 14, 2026 16:06
@llastflowers
llastflowers requested a review from a team as a code owner August 14, 2026 16:06
@llastflowers
llastflowers requested a review from jonrohan August 14, 2026 16:06
@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cf7f35c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

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 deprecates the Flash component in @primer/react, and exposes it via the @primer/react/deprecated entrypoint to guide consumers toward migration (notably toward Banner).

Changes:

  • Added @deprecated JSDoc annotations to Flash and FlashProps.
  • Marked Flash docs metadata as deprecated and updated docs import path to @primer/react/deprecated.
  • Exported Flash from the @primer/react/deprecated entrypoint and updated the export snapshot.
Show a summary per file
File Description
packages/react/src/Flash/Flash.tsx Adds @deprecated annotations to surface deprecation warnings in TS/editor tooling.
packages/react/src/Flash/Flash.docs.json Marks Flash as deprecated in docs metadata and points imports to @primer/react/deprecated.
packages/react/src/deprecated/index.ts Adds Flash to the deprecated entrypoint exports.
packages/react/src/tests/snapshots/exports.test.ts.snap Updates the deprecated entrypoint export snapshot to include Flash.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

packages/react/src/Flash/Flash.tsx:17

  • Same as above: add the new @primer/react/deprecated import path to the component-level @deprecated message so the warning is actionable for consumers.
/**
 * @deprecated Use `Banner` instead.
 */
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread packages/react/src/deprecated/index.ts Outdated
Comment thread packages/react/src/deprecated/index.ts Outdated
Comment on lines +46 to +48
// Deprecated in v38
export {default as Flash} from '../Flash'
export type {FlashProps} from '../Flash'
Comment on lines +6 to +8
/**
* @deprecated Use `Banner` instead.
*/
llastflowers and others added 2 commits August 14, 2026 09:14
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8306 August 14, 2026 16:16 Inactive
expand deprecation notice a little more
@github-actions
github-actions Bot requested a deployment to storybook-preview-8306 August 14, 2026 16:22 Abandoned
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8306 August 14, 2026 16:33 Inactive
@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

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

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants