Replace deprecated humanizeEntityRef with Catalog Presentation API

Migrate all humanizeEntityRef and humanizeEntity usages to the Catalog
Presentation API across catalog, catalog-react, org-react,
catalog-import, scaffolder, and techdocs plugins.

- Use useEntityPresentation hook in React component contexts
  (AncestryPage)
- Use defaultEntityPresentation for non-React contexts like sort
  comparators, filter functions, and data mappers
- Add @deprecated tags to humanizeEntityRef and humanizeEntity
- Improve TSDoc on entityPresentationApiRef, EntityPresentationApi,
  useEntityPresentation, EntityDisplayName, and
  defaultEntityPresentation with guidance on which to use when
- Add Entity Presentation docs page with usage examples and migration
  guide

Made-with: Cursor

Signed-off-by: Marat Dyatko <maratd@spotify.com>
This commit is contained in:
Marat Dyatko
2026-03-25 16:15:27 +01:00
parent 36d205a455
commit 5f9a531412
24 changed files with 275 additions and 69 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` from the Catalog Presentation API in `StepPrepareCreatePullRequest`.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` and `useEntityPresentation` from the Catalog Presentation API in `EntityOwnerPicker`, `EntityTable`, `EntityDataTable`, and `AncestryPage` components.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` from the Catalog Presentation API in `CatalogTable` and its column factories.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org-react': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` from the Catalog Presentation API in `GroupListPicker`.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` from the Catalog Presentation API in `TemplateFormPreviewer`.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs': patch
---
Replaced `humanizeEntityRef` with `defaultEntityPresentation` from the Catalog Presentation API in TechDocs table helpers.