Skip to content

Fix deprecated Backstage APIs in shortcuts plugin - #11350

Merged
hopehadfield merged 1 commit into
backstage:mainfrom
AdamBrez:shortcuts/list-deprecations
Dec 1, 2026
Merged

hopehadfield merged 1 commit into
backstage:mainfrom
AdamBrez:shortcuts/list-deprecations

Conversation

@AdamBrez

@AdamBrez AdamBrez commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

Replaces the deprecated AlertApi with coreApis.toast (ToastApi) in AddShortcut and EditShortcut, mapping display: 'transient' to a 5000ms timeout per the migration guide. Also replaces deprecated test utilities MockStorageApi, MockAnalyticsApi, and AlertDisplay across the plugin's test suite, and enables listDeprecations in bcp.json.

This PR is a part of #5994

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@AdamBrez
AdamBrez requested a review from a team as a code owner September 24, 2026 16:41
@AdamBrez
AdamBrez requested review from 04kash and a lite review from Copilot September 24, 2026 16:41

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@backstage-goalie

backstage-goalie Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-shortcuts workspaces/shortcuts/plugins/shortcuts patch v0.27.0

@04kash 04kash left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@AdamBrez from what I understand we can't get the CI to be green since it depends on an upstream fix?

In that case I'd prefer if we fix that upstream first instead of merging the PR with a failing CI. WDYT @hopehadfield?

@AdamBrez

AdamBrez commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @04kash, yes you understand it correctly.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

@github-actions github-actions Bot added the stale label Nov 24, 2026
Replaces the deprecated AlertApi with coreApis.toast in AddShortcut and
EditShortcut, mapping display: 'transient' to a 5000ms timeout per the
migration guide. Also replaces deprecated test utilities
MockStorageApi, MockAnalyticsApi, and AlertDisplay across the plugin's
test suite, and enables listDeprecations in bcp.json.

Signed-off-by: Adam Brezina <[email protected]>
@AdamBrez
AdamBrez force-pushed the shortcuts/list-deprecations branch from 2bddc4e to 92394c5 Compare November 26, 2026 13:30
@AdamBrez

Copy link
Copy Markdown
Contributor Author

Rebased onto main now that Backstage v1.57.1 includes backstage/backstage#34694 (which keeps IconComponent un-deprecated in @backstage/core-plugin-api). Also updated toastApiRef -> coreApis.toast, removed deprecated AlertDisplay from tests, and verified list-deprecations, lint, typecheck, and tests all pass locally.

@hopehadfield hopehadfield 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.

Great, lgtm! Thanks @AdamBrez

@hopehadfield
hopehadfield merged commit d88f164 into backstage:main Dec 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants