Skip to content

Commit

Permalink
Merge pull request backstage#6862 from kuangp/chore/UnregisterEntityD…
Browse files Browse the repository at this point in the history
…ialog

chore(UnregisterEntityDialog): migrate to catalog-react
  • Loading branch information
timbonicus authored Aug 17, 2021
2 parents 3671384 + 2105d60 commit 4f1a43e
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/seven-glasses-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-react': patch
---

Migrate and export `UnregisterEntityDialog` component from `catalog-react` package
11 changes: 11 additions & 0 deletions plugins/catalog-react/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,17 @@ export function reduceEntityFilters(
// @public (undocumented)
export const rootRoute: RouteRef<undefined>;

// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "UnregisterEntityDialog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const UnregisterEntityDialog: ({
open,
onConfirm,
onClose,
entity,
}: Props_3) => JSX.Element;

// Warning: (ae-missing-release-tag) "useEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import React from 'react';
import { UnregisterEntityDialog } from './UnregisterEntityDialog';
import { ORIGIN_LOCATION_ANNOTATION } from '@backstage/catalog-model';
import { CatalogClient } from '@backstage/catalog-client';
import { catalogApiRef } from '@backstage/plugin-catalog-react';
import { catalogApiRef } from '../../api';
import { screen, waitFor } from '@testing-library/react';
import { renderInTestApp } from '@backstage/test-utils';
import * as state from './useUnregisterEntityDialogState';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 The Backstage Authors
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

import { Entity } from '@backstage/catalog-model';
import { EntityRefLink } from '@backstage/plugin-catalog-react';
import { EntityRefLink } from '../EntityRefLink';
import {
Box,
Button,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export { UnregisterEntityDialog } from './UnregisterEntityDialog';
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
Location,
ORIGIN_LOCATION_ANNOTATION,
} from '@backstage/catalog-model';
import { CatalogApi, catalogApiRef } from '@backstage/plugin-catalog-react';
import { CatalogApi } from '@backstage/catalog-client';
import { catalogApiRef } from '../../api';
import {
act,
renderHook,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
getEntityName,
ORIGIN_LOCATION_ANNOTATION,
} from '@backstage/catalog-model';
import { catalogApiRef } from '@backstage/plugin-catalog-react';
import { catalogApiRef } from '../../api';
import { useCallback } from 'react';
import { useAsync } from 'react-use';
import { useApi } from '@backstage/core-plugin-api';
Expand Down
1 change: 1 addition & 0 deletions plugins/catalog-react/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export * from './EntityTable';
export * from './EntityTagPicker';
export * from './EntityTypePicker';
export * from './FavoriteEntity';
export * from './UnregisterEntityDialog';
export * from './UserListPicker';
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ import {
EntityRefLinks,
FavoriteEntity,
getEntityRelations,
UnregisterEntityDialog,
useEntityCompoundName,
} from '@backstage/plugin-catalog-react';
import { Box, TabProps } from '@material-ui/core';
import { Alert } from '@material-ui/lab';
import React, { useContext, useState } from 'react';
import { useNavigate } from 'react-router';
import { EntityContextMenu } from '../EntityContextMenu/EntityContextMenu';
import { UnregisterEntityDialog } from '../UnregisterEntityDialog/UnregisterEntityDialog';

type SubRoute = {
path: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import {
EntityRefLinks,
FavoriteEntity,
getEntityRelations,
UnregisterEntityDialog,
useEntityCompoundName,
} from '@backstage/plugin-catalog-react';
import { Box } from '@material-ui/core';
import React, { useContext, useState } from 'react';
import { useNavigate } from 'react-router';
import { EntityContextMenu } from '../EntityContextMenu/EntityContextMenu';
import { UnregisterEntityDialog } from '../UnregisterEntityDialog/UnregisterEntityDialog';
import { Tabbed } from './Tabbed';

import {
Expand Down

0 comments on commit 4f1a43e

Please sign in to comment.