From 0277801a960137a8e7e92903f2da751282d63b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 30 Mar 2026 21:16:11 +0200 Subject: [PATCH] Remove duplicate presentation API exports from alpha, import from public API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- plugins/catalog-react/report-alpha.api.md | 60 +------------------ plugins/catalog-react/src/alpha/index.ts | 8 --- .../EntityDataTable/columnFactories.tsx | 5 +- 3 files changed, 5 insertions(+), 68 deletions(-) diff --git a/plugins/catalog-react/report-alpha.api.md b/plugins/catalog-react/report-alpha.api.md index c2818b78ee..19f1b2ce3a 100644 --- a/plugins/catalog-react/report-alpha.api.md +++ b/plugins/catalog-react/report-alpha.api.md @@ -6,19 +6,17 @@ import { AnyRouteRefParams } from '@backstage/frontend-plugin-api'; import { ColumnConfig } from '@backstage/ui'; import { ComponentType } from 'react'; -import { CompoundEntityRef } from '@backstage/catalog-model'; import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; import { Entity } from '@backstage/catalog-model'; +import { EntityPresentationApi } from '@backstage/plugin-catalog-react'; import { ExtensionBlueprint } from '@backstage/frontend-plugin-api'; import { ExtensionDataRef } from '@backstage/frontend-plugin-api'; import { ExtensionDefinition } from '@backstage/frontend-plugin-api'; import { FilterPredicate } from '@backstage/filter-predicates'; -import { IconComponent } from '@backstage/core-plugin-api'; import { IconLinkVerticalProps } from '@backstage/core-components'; import { JSX as JSX_2 } from 'react'; import { JSX as JSX_3 } from 'react/jsx-runtime'; import { JSXElementConstructor } from 'react'; -import { Observable } from '@backstage/types'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { ResourcePermission } from '@backstage/plugin-permission-common'; @@ -186,15 +184,6 @@ export const defaultEntityContentGroups: Record< string >; -// @public -export function defaultEntityPresentation( - entityOrRef: Entity | CompoundEntityRef | string, - context?: { - defaultKind?: string; - defaultNamespace?: string; - }, -): EntityRefPresentationSnapshot; - // @alpha export const EntityCardBlueprint: ExtensionBlueprint<{ kind: 'entity-card'; @@ -534,18 +523,6 @@ export interface EntityDataTableProps { loading?: boolean; } -// @public -export const EntityDisplayName: (props: EntityDisplayNameProps) => JSX.Element; - -// @public -export type EntityDisplayNameProps = { - entityRef: Entity | CompoundEntityRef | string; - hideIcon?: boolean; - disableTooltip?: boolean; - defaultKind?: string; - defaultNamespace?: string; -}; - // @alpha (undocumented) export const EntityHeaderBlueprint: ExtensionBlueprint<{ kind: 'entity-header'; @@ -653,32 +630,6 @@ export const EntityIconLinkBlueprint: ExtensionBlueprint<{ }; }>; -// @public -export interface EntityPresentationApi { - forEntity( - entityOrRef: Entity | string, - context?: { - defaultKind?: string; - defaultNamespace?: string; - }, - ): EntityRefPresentation; -} - -// @public -export interface EntityRefPresentation { - promise: Promise; - snapshot: EntityRefPresentationSnapshot; - update$?: Observable; -} - -// @public -export interface EntityRefPresentationSnapshot { - entityRef: string; - Icon?: IconComponent | undefined | false; - primaryTitle: string; - secondaryTitle?: string; -} - // @public (undocumented) export function EntityRelationCard( props: EntityRelationCardProps, @@ -752,15 +703,6 @@ export function useEntityPermission( error?: Error; }; -// @public -export function useEntityPresentation( - entityOrRef: Entity | CompoundEntityRef | string, - context?: { - defaultKind?: string; - defaultNamespace?: string; - }, -): EntityRefPresentationSnapshot; - // @alpha (undocumented) export type UseProps = () => | { diff --git a/plugins/catalog-react/src/alpha/index.ts b/plugins/catalog-react/src/alpha/index.ts index 47418eaa2a..d473b0923f 100644 --- a/plugins/catalog-react/src/alpha/index.ts +++ b/plugins/catalog-react/src/alpha/index.ts @@ -26,13 +26,5 @@ export const catalogReactTranslationRef = _catalogReactTranslationRef; export { isOwnerOf } from '../utils/isOwnerOf'; export { useEntityPermission } from '../hooks/useEntityPermission'; export * from '../components/EntityTable/TitleColumn'; -export type { - EntityPresentationApi, - EntityRefPresentation, - EntityRefPresentationSnapshot, -} from '../apis'; -export { useEntityPresentation, defaultEntityPresentation } from '../apis'; -export { EntityDisplayName } from '../components/EntityDisplayName'; -export type { EntityDisplayNameProps } from '../components/EntityDisplayName'; export * from '../components/EntityDataTable'; export * from '../components/EntityRelationCard'; diff --git a/plugins/catalog-react/src/components/EntityDataTable/columnFactories.tsx b/plugins/catalog-react/src/components/EntityDataTable/columnFactories.tsx index 5c425907d3..b0ff221e9d 100644 --- a/plugins/catalog-react/src/components/EntityDataTable/columnFactories.tsx +++ b/plugins/catalog-react/src/components/EntityDataTable/columnFactories.tsx @@ -21,7 +21,10 @@ import { } from '@backstage/catalog-model'; import { Cell, CellText, Column, ColumnConfig, TableItem } from '@backstage/ui'; import { EntityRefLink, EntityRefLinks } from '../EntityRefLink'; -import { defaultEntityPresentation, EntityPresentationApi } from '../../apis'; +import { + defaultEntityPresentation, + EntityPresentationApi, +} from '@backstage/plugin-catalog-react'; import { EntityTableColumnTitle } from '../EntityTable/TitleColumn'; import { getEntityRelations } from '../../utils';