Deprecate Flash component in primer/react - #8306
Conversation
🦋 Changeset detectedLatest commit: cf7f35c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
There was a problem hiding this comment.
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
@deprecatedJSDoc annotations toFlashandFlashProps. - Marked
Flashdocs metadata as deprecated and updated docs import path to@primer/react/deprecated. - Exported
Flashfrom the@primer/react/deprecatedentrypoint 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/deprecatedimport path to the component-level@deprecatedmessage so the warning is actionable for consumers.
/**
* @deprecated Use `Banner` instead.
*/
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Lite
| // Deprecated in v38 | ||
| export {default as Flash} from '../Flash' | ||
| export type {FlashProps} from '../Flash' |
| /** | ||
| * @deprecated Use `Banner` instead. | ||
| */ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
expand deprecation notice a little more
Relates to https://github.com/github/primer/issues/5437
Changelog
Changed
Deprecate the
Flashcomponent and move to@primer/react/deprecatedRollout strategy
Testing & Reviewing