From f7fb7295e62741872171fc948f17c7583ecc8d45 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 14 Mar 2022 12:31:55 +0100 Subject: [PATCH] catalog-react: remove deprecated favorite column helpers Signed-off-by: Patrik Oldsberg --- .changeset/nervous-spiders-join.md | 5 +++++ plugins/catalog-react/api-report.md | 8 -------- .../components/FavoriteEntity/FavoriteEntity.tsx | 14 -------------- .../src/components/FavoriteEntity/index.ts | 6 +----- 4 files changed, 6 insertions(+), 27 deletions(-) create mode 100644 .changeset/nervous-spiders-join.md diff --git a/.changeset/nervous-spiders-join.md b/.changeset/nervous-spiders-join.md new file mode 100644 index 0000000000..fcbce29177 --- /dev/null +++ b/.changeset/nervous-spiders-join.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': minor +--- + +**BREAKING**: Removed the deprecated `favoriteEntityTooltip` and `favoriteEntityIcon` functions. diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 4912c857cf..5b3ac4f6a3 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -388,19 +388,11 @@ export interface EntityTypePickerProps { // @public export const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element; -// @public @deprecated (undocumented) -export const favoriteEntityIcon: (isStarred: boolean) => JSX.Element; - // @public (undocumented) export type FavoriteEntityProps = ComponentProps & { entity: Entity; }; -// @public @deprecated (undocumented) -export const favoriteEntityTooltip: ( - isStarred: boolean, -) => 'Remove from favorites' | 'Add to favorites'; - // @public @deprecated (undocumented) export const formatEntityRefTitle: typeof humanizeEntityRef; diff --git a/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx b/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx index eaa2821448..e055f4056f 100644 --- a/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx +++ b/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx @@ -32,20 +32,6 @@ const YellowStar = withStyles({ }, })(Star); -/** - * @public - * @deprecated due to low utility value. - */ -export const favoriteEntityTooltip = (isStarred: boolean) => - isStarred ? 'Remove from favorites' : 'Add to favorites'; - -/** - * @public - * @deprecated due to low utility value. - */ -export const favoriteEntityIcon = (isStarred: boolean) => - isStarred ? : ; - /** * IconButton for showing if a current entity is starred and adding/removing it from the favorite entities * @param props - MaterialUI IconButton props extended by required `entity` prop diff --git a/plugins/catalog-react/src/components/FavoriteEntity/index.ts b/plugins/catalog-react/src/components/FavoriteEntity/index.ts index a46d04b6c7..3f54e29da9 100644 --- a/plugins/catalog-react/src/components/FavoriteEntity/index.ts +++ b/plugins/catalog-react/src/components/FavoriteEntity/index.ts @@ -14,9 +14,5 @@ * limitations under the License. */ -export { - favoriteEntityTooltip, - favoriteEntityIcon, - FavoriteEntity, -} from './FavoriteEntity'; +export { FavoriteEntity } from './FavoriteEntity'; export type { FavoriteEntityProps } from './FavoriteEntity';