@backstage/plugin-techdocs 1.15.1 → 1.15.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @backstage/plugin-techdocs
2
2
 
3
+ ## 1.15.2-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - a4d4a70: Fixed an issue where the entire TechDocs page would re-render when navigating between pages within the same entity's documentation.
8
+ - Updated dependencies
9
+ - @backstage/plugin-search-react@1.9.6-next.0
10
+ - @backstage/plugin-catalog-react@1.21.3-next.0
11
+ - @backstage/core-plugin-api@1.11.2-next.0
12
+ - @backstage/config@1.3.6-next.0
13
+ - @backstage/core-components@0.18.3-next.0
14
+ - @backstage/catalog-model@1.7.6-next.0
15
+ - @backstage/integration@1.18.2-next.0
16
+ - @backstage/frontend-plugin-api@0.12.2-next.0
17
+ - @backstage/catalog-client@1.12.1-next.0
18
+ - @backstage/core-compat-api@0.5.4-next.0
19
+ - @backstage/errors@1.2.7
20
+ - @backstage/integration-react@1.2.12-next.0
21
+ - @backstage/theme@0.7.0
22
+ - @backstage/plugin-auth-react@0.1.21-next.0
23
+ - @backstage/plugin-search-common@1.2.21-next.0
24
+ - @backstage/plugin-techdocs-common@0.1.1
25
+ - @backstage/plugin-techdocs-react@1.3.5-next.0
26
+
3
27
  ## 1.15.1
4
28
 
5
29
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-techdocs";
2
- var version = "1.15.1";
2
+ var version = "1.15.2-next.0";
3
3
  var description = "The Backstage plugin that renders technical documentation for your components";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
@@ -1,18 +1,16 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useMemo, useCallback, useEffect, Children } from 'react';
3
- import { useOutlet, useNavigate } from 'react-router-dom';
2
+ import { useMemo, Children } from 'react';
3
+ import { useOutlet } from 'react-router-dom';
4
4
  import { Page, Progress } from '@backstage/core-components';
5
- import { buildTechDocsURL, TECHDOCS_ADDONS_WRAPPER_KEY, TECHDOCS_ADDONS_KEY, TechDocsReaderPageProvider } from '@backstage/plugin-techdocs-react';
6
- import { TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';
7
- import useAsync from 'react-use/esm/useAsync';
5
+ import { TECHDOCS_ADDONS_WRAPPER_KEY, TECHDOCS_ADDONS_KEY, TechDocsReaderPageProvider } from '@backstage/plugin-techdocs-react';
8
6
  import { TechDocsReaderPageContent } from '../TechDocsReaderPageContent/TechDocsReaderPageContent.esm.js';
9
7
  import { TechDocsReaderPageHeader } from '../TechDocsReaderPageHeader/TechDocsReaderPageHeader.esm.js';
10
8
  import { TechDocsReaderPageSubheader } from '../TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.esm.js';
11
9
  import { rootDocsRouteRef } from '../../../routes.esm.js';
12
- import { useRouteRefParams, useApi, useRouteRef, getComponentData } from '@backstage/core-plugin-api';
10
+ import { useRouteRefParams, getComponentData } from '@backstage/core-plugin-api';
13
11
  import { CookieAuthRefreshProvider } from '@backstage/plugin-auth-react';
14
- import { catalogApiRef } from '@backstage/plugin-catalog-react';
15
12
  import { styled, useTheme, createTheme, ThemeProvider } from '@material-ui/core/styles';
13
+ import { useExternalRedirect } from './useExternalRedirect.esm.js';
16
14
 
17
15
  const TechDocsReaderLayout = (props) => {
18
16
  const { withSearch, withHeader = true } = props;
@@ -38,9 +36,6 @@ const TechDocsReaderPage = (props) => {
38
36
  const { kind, name, namespace } = useRouteRefParams(rootDocsRouteRef);
39
37
  const { children, entityRef = { kind, name, namespace } } = props;
40
38
  const outlet = useOutlet();
41
- const catalogApi = useApi(catalogApiRef);
42
- const navigate = useNavigate();
43
- const viewTechdocLink = useRouteRef(rootDocsRouteRef);
44
39
  const memoizedEntityRef = useMemo(
45
40
  () => ({
46
41
  kind: entityRef.kind,
@@ -49,31 +44,7 @@ const TechDocsReaderPage = (props) => {
49
44
  }),
50
45
  [entityRef.kind, entityRef.name, entityRef.namespace]
51
46
  );
52
- const externalEntityTechDocsUrl = useAsync(async () => {
53
- try {
54
- const catalogEntity = await catalogApi.getEntityByRef(memoizedEntityRef);
55
- if (catalogEntity?.metadata?.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {
56
- return buildTechDocsURL(catalogEntity, viewTechdocLink);
57
- }
58
- } catch (error) {
59
- }
60
- return void 0;
61
- }, [memoizedEntityRef, catalogApi, viewTechdocLink]);
62
- const handleNavigation = useCallback(
63
- (url) => {
64
- navigate(url, { replace: true });
65
- },
66
- [navigate]
67
- );
68
- useEffect(() => {
69
- if (!externalEntityTechDocsUrl.loading && externalEntityTechDocsUrl.value) {
70
- handleNavigation(externalEntityTechDocsUrl.value);
71
- }
72
- }, [
73
- externalEntityTechDocsUrl.loading,
74
- externalEntityTechDocsUrl.value,
75
- handleNavigation
76
- ]);
47
+ const { shouldShowProgress } = useExternalRedirect(memoizedEntityRef);
77
48
  const page = useMemo(() => {
78
49
  if (children) {
79
50
  return null;
@@ -86,7 +57,7 @@ const TechDocsReaderPage = (props) => {
86
57
  (grandChild) => !getComponentData(grandChild, TECHDOCS_ADDONS_WRAPPER_KEY) && !getComponentData(grandChild, TECHDOCS_ADDONS_KEY)
87
58
  );
88
59
  }, [children, outlet]);
89
- if (externalEntityTechDocsUrl.loading || externalEntityTechDocsUrl.value) {
60
+ if (shouldShowProgress) {
90
61
  return /* @__PURE__ */ jsx(Progress, {});
91
62
  }
92
63
  if (!children) {
@@ -1 +1 @@
1
- {"version":3,"file":"TechDocsReaderPage.esm.js","sources":["../../../../src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Children,\n ReactElement,\n ReactNode,\n useEffect,\n useMemo,\n useCallback,\n} from 'react';\nimport { useOutlet, useNavigate } from 'react-router-dom';\nimport { Page } from '@backstage/core-components';\nimport { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n TECHDOCS_ADDONS_KEY,\n TECHDOCS_ADDONS_WRAPPER_KEY,\n TechDocsReaderPageProvider,\n buildTechDocsURL,\n} from '@backstage/plugin-techdocs-react';\nimport { TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';\nimport useAsync from 'react-use/esm/useAsync';\nimport { TechDocsReaderPageRenderFunction } from '../../../types';\nimport { TechDocsReaderPageContent } from '../TechDocsReaderPageContent';\nimport { TechDocsReaderPageHeader } from '../TechDocsReaderPageHeader';\nimport { TechDocsReaderPageSubheader } from '../TechDocsReaderPageSubheader';\nimport { rootDocsRouteRef } from '../../../routes';\nimport {\n getComponentData,\n useRouteRefParams,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport { CookieAuthRefreshProvider } from '@backstage/plugin-auth-react';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport {\n createTheme,\n styled,\n ThemeOptions,\n ThemeProvider,\n useTheme,\n} from '@material-ui/core/styles';\nimport { Progress } from '@backstage/core-components';\n\n/* An explanation for the multiple ways of customizing the TechDocs reader page\n\nPlease refer to this page on the microsite for the latest recommended approach:\nhttps://backstage.io/docs/features/techdocs/how-to-guides#how-to-customize-the-techdocs-reader-page\n\nThe <TechDocsReaderPage> component is responsible for rendering the <TechDocsReaderPageProvider> and\nits contained version of a <Page>, which in turn renders the <TechDocsReaderPageContent>.\n\nHistorically, there have been different approaches on how this <Page> can be customized, and how the\n<TechDocsReaderPageContent> inside could be exchanged for a custom implementation (which was not\npossible before). Also, the current implementation supports every scenario to avoid breaking default\nconfigurations of TechDocs.\n\nIn particular, there are 4 different TechDocs page configurations:\n\nCONFIGURATION 1: <TechDocsReaderPage> only, no children\n\n<Route path=\"/docs/:namespace/:kind/:name/*\" element={<TechDocsReaderPage />} >\n\nThis is the simplest way to use TechDocs. Only a full page is passed, assuming that it comes with\nits content inside. Since we allowed customizing it, we started providing <TechDocsReaderLayout> as\na default implementation (which contains <TechDocsReaderPageContent>).\n\nCONFIGURATION 2 (not advised): <TechDocsReaderPage> with element children\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {techdocsPage}\n </TechDocsReaderPage>\n }\n/>\n\nPreviously, there were two ways of passing children to <TechDocsReaderPage>: either as elements (as\nshown above), or as a render function (described below in CONFIGURATION 3). The \"techdocsPage\" is\nlocated in packages/app/src/components/techdocs and is the default implementation of the content\ninside.\n\nCONFIGURATION 3 (not advised): <TechDocsReaderPage> with render function as child\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {({ metadata, entityMetadata, onReady }) => (\n techdocsPage\n )}\n </TechDocsReaderPage>\n }\n/>\n\nSimilar to CONFIGURATION 2, the direct children will be passed to the <TechDocsReaderPage> but in\nthis case interpreted as render prop.\n\nCONFIGURATION 4: <TechDocsReaderPage> and provided content in <Route>\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={<TechDocsReaderPage />}\n>\n {techDocsPage}\n <TechDocsAddons>\n <ExpandableNavigation />\n <ReportIssue />\n <TextSize />\n <LightBox />\n </TechDocsAddons>\n</Route>\n\nThis is the current state in packages/app/src/App.tsx and moved the location of children from inside\nthe element prop in the <Route> to the children of the <Route>. Then, in <TechDocsReaderPage> they\nare retrieved using the useOutlet hook from React Router.\n\nNOTE: Render functions are no longer supported in this approach.\n*/\n\n/**\n * Props for {@link TechDocsReaderLayout}\n * @public\n */\nexport type TechDocsReaderLayoutProps = {\n /**\n * Show or hide the header, defaults to true.\n */\n withHeader?: boolean;\n /**\n * Show or hide the content search bar, defaults to true.\n */\n withSearch?: boolean;\n};\n\n/**\n * Default TechDocs reader page structure composed with a header and content\n * @public\n */\nexport const TechDocsReaderLayout = (props: TechDocsReaderLayoutProps) => {\n const { withSearch, withHeader = true } = props;\n return (\n <Page themeId=\"documentation\">\n {withHeader && <TechDocsReaderPageHeader />}\n <TechDocsReaderPageSubheader />\n <TechDocsReaderPageContent withSearch={withSearch} />\n </Page>\n );\n};\n\n/**\n * @public\n */\nexport type TechDocsReaderPageProps = {\n entityRef?: CompoundEntityRef;\n children?: TechDocsReaderPageRenderFunction | ReactNode;\n overrideThemeOptions?: Partial<ThemeOptions>;\n};\n\n/**\n * Styled Backstage Page that fills available vertical space\n */\nconst StyledPage = styled(Page)({\n height: 'inherit',\n overflowY: 'visible',\n});\n\n/**\n * An addon-aware implementation of the TechDocsReaderPage.\n *\n * @public\n */\nexport const TechDocsReaderPage = (props: TechDocsReaderPageProps) => {\n const currentTheme = useTheme();\n\n const readerPageTheme = useMemo(\n () =>\n createTheme({\n ...currentTheme,\n ...(props.overrideThemeOptions || {}),\n }),\n [currentTheme, props.overrideThemeOptions],\n );\n\n const { kind, name, namespace } = useRouteRefParams(rootDocsRouteRef);\n const { children, entityRef = { kind, name, namespace } } = props;\n\n const outlet = useOutlet();\n\n const catalogApi = useApi(catalogApiRef);\n const navigate = useNavigate();\n const viewTechdocLink = useRouteRef(rootDocsRouteRef);\n\n const memoizedEntityRef = useMemo(\n () => ({\n kind: entityRef.kind,\n name: entityRef.name,\n namespace: entityRef.namespace,\n }),\n [entityRef.kind, entityRef.name, entityRef.namespace],\n );\n\n const externalEntityTechDocsUrl = useAsync(async () => {\n try {\n const catalogEntity = await catalogApi.getEntityByRef(memoizedEntityRef);\n\n if (\n catalogEntity?.metadata?.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) {\n return buildTechDocsURL(catalogEntity, viewTechdocLink);\n }\n } catch (error) {\n // Ignore error and allow an attempt at loading the current entity's TechDocs when unable to fetch an external entity from the catalog.\n }\n\n return undefined;\n }, [memoizedEntityRef, catalogApi, viewTechdocLink]);\n\n const handleNavigation = useCallback(\n (url: string) => {\n navigate(url, { replace: true });\n },\n [navigate],\n );\n\n useEffect(() => {\n if (!externalEntityTechDocsUrl.loading && externalEntityTechDocsUrl.value) {\n handleNavigation(externalEntityTechDocsUrl.value);\n }\n }, [\n externalEntityTechDocsUrl.loading,\n externalEntityTechDocsUrl.value,\n handleNavigation,\n ]);\n\n const page: ReactNode = useMemo(() => {\n if (children) {\n return null;\n }\n\n const childrenList = outlet ? Children.toArray(outlet.props.children) : [];\n\n const grandChildren = childrenList.flatMap<ReactElement>(\n child => (child as ReactElement)?.props?.children ?? [],\n );\n\n return grandChildren.find(\n grandChild =>\n !getComponentData(grandChild, TECHDOCS_ADDONS_WRAPPER_KEY) &&\n !getComponentData(grandChild, TECHDOCS_ADDONS_KEY),\n );\n }, [children, outlet]);\n\n if (externalEntityTechDocsUrl.loading || externalEntityTechDocsUrl.value) {\n return <Progress />;\n }\n\n // As explained above, \"page\" is configuration 4 and <TechDocsReaderLayout> is 1\n if (!children) {\n return (\n <ThemeProvider theme={readerPageTheme}>\n <CookieAuthRefreshProvider pluginId=\"techdocs\">\n <TechDocsReaderPageProvider entityRef={memoizedEntityRef}>\n {(page as JSX.Element) || <TechDocsReaderLayout />}\n </TechDocsReaderPageProvider>\n </CookieAuthRefreshProvider>\n </ThemeProvider>\n );\n }\n\n // As explained above, a render function is configuration 3 and React element is 2\n return (\n <ThemeProvider theme={readerPageTheme}>\n <CookieAuthRefreshProvider pluginId=\"techdocs\">\n <TechDocsReaderPageProvider entityRef={memoizedEntityRef}>\n {({ metadata, entityMetadata, onReady }) => (\n <StyledPage\n themeId=\"documentation\"\n className=\"techdocs-reader-page\"\n >\n {children instanceof Function\n ? children({\n entityRef: memoizedEntityRef,\n techdocsMetadataValue: metadata.value,\n entityMetadataValue: entityMetadata.value,\n onReady,\n })\n : children}\n </StyledP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;AAAA,MACC,OAAA,EAAQ,eAAA;AAAA,MACR,SAAA,EAAU,sBAAA;AAAA,MAET,QAAA,EAAA,QAAA,YAAoB,WACjB,QAAA,CAAS;AAAA,QACP,SAAA,EAAW,iBAAA;AAAA,QACX,uBAAuB,QAAA,CAAS,KAAA;AAAA,QAChC,qBAAqB,cAAA,CAAe,KAAA;AAAA,QACpC;AAAA,OACD,CAAA,GACD;AAAA;AAAA,GACN,EAEJ,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TechDocsReaderPage.esm.js","sources":["../../../../src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Children, ReactElement, ReactNode, useMemo } from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport { Page, Progress } from '@backstage/core-components';\nimport { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n TECHDOCS_ADDONS_KEY,\n TECHDOCS_ADDONS_WRAPPER_KEY,\n TechDocsReaderPageProvider,\n} from '@backstage/plugin-techdocs-react';\nimport { TechDocsReaderPageRenderFunction } from '../../../types';\nimport { TechDocsReaderPageContent } from '../TechDocsReaderPageContent';\nimport { TechDocsReaderPageHeader } from '../TechDocsReaderPageHeader';\nimport { TechDocsReaderPageSubheader } from '../TechDocsReaderPageSubheader';\nimport { rootDocsRouteRef } from '../../../routes';\nimport {\n getComponentData,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport { CookieAuthRefreshProvider } from '@backstage/plugin-auth-react';\nimport {\n createTheme,\n styled,\n ThemeOptions,\n ThemeProvider,\n useTheme,\n} from '@material-ui/core/styles';\nimport { useExternalRedirect } from './useExternalRedirect';\n\n/* An explanation for the multiple ways of customizing the TechDocs reader page\n\nPlease refer to this page on the microsite for the latest recommended approach:\nhttps://backstage.io/docs/features/techdocs/how-to-guides#how-to-customize-the-techdocs-reader-page\n\nThe <TechDocsReaderPage> component is responsible for rendering the <TechDocsReaderPageProvider> and\nits contained version of a <Page>, which in turn renders the <TechDocsReaderPageContent>.\n\nHistorically, there have been different approaches on how this <Page> can be customized, and how the\n<TechDocsReaderPageContent> inside could be exchanged for a custom implementation (which was not\npossible before). Also, the current implementation supports every scenario to avoid breaking default\nconfigurations of TechDocs.\n\nIn particular, there are 4 different TechDocs page configurations:\n\nCONFIGURATION 1: <TechDocsReaderPage> only, no children\n\n<Route path=\"/docs/:namespace/:kind/:name/*\" element={<TechDocsReaderPage />} >\n\nThis is the simplest way to use TechDocs. Only a full page is passed, assuming that it comes with\nits content inside. Since we allowed customizing it, we started providing <TechDocsReaderLayout> as\na default implementation (which contains <TechDocsReaderPageContent>).\n\nCONFIGURATION 2 (not advised): <TechDocsReaderPage> with element children\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {techdocsPage}\n </TechDocsReaderPage>\n }\n/>\n\nPreviously, there were two ways of passing children to <TechDocsReaderPage>: either as elements (as\nshown above), or as a render function (described below in CONFIGURATION 3). The \"techdocsPage\" is\nlocated in packages/app/src/components/techdocs and is the default implementation of the content\ninside.\n\nCONFIGURATION 3 (not advised): <TechDocsReaderPage> with render function as child\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={\n <TechDocsReaderPage>\n {({ metadata, entityMetadata, onReady }) => (\n techdocsPage\n )}\n </TechDocsReaderPage>\n }\n/>\n\nSimilar to CONFIGURATION 2, the direct children will be passed to the <TechDocsReaderPage> but in\nthis case interpreted as render prop.\n\nCONFIGURATION 4: <TechDocsReaderPage> and provided content in <Route>\n\n<Route\n path=\"/docs/:namespace/:kind/:name/*\"\n element={<TechDocsReaderPage />}\n>\n {techDocsPage}\n <TechDocsAddons>\n <ExpandableNavigation />\n <ReportIssue />\n <TextSize />\n <LightBox />\n </TechDocsAddons>\n</Route>\n\nThis is the current state in packages/app/src/App.tsx and moved the location of children from inside\nthe element prop in the <Route> to the children of the <Route>. Then, in <TechDocsReaderPage> they\nare retrieved using the useOutlet hook from React Router.\n\nNOTE: Render functions are no longer supported in this approach.\n*/\n\n/**\n * Props for {@link TechDocsReaderLayout}\n * @public\n */\nexport type TechDocsReaderLayoutProps = {\n /**\n * Show or hide the header, defaults to true.\n */\n withHeader?: boolean;\n /**\n * Show or hide the content search bar, defaults to true.\n */\n withSearch?: boolean;\n};\n\n/**\n * Default TechDocs reader page structure composed with a header and content\n * @public\n */\nexport const TechDocsReaderLayout = (props: TechDocsReaderLayoutProps) => {\n const { withSearch, withHeader = true } = props;\n return (\n <Page themeId=\"documentation\">\n {withHeader && <TechDocsReaderPageHeader />}\n <TechDocsReaderPageSubheader />\n <TechDocsReaderPageContent withSearch={withSearch} />\n </Page>\n );\n};\n\n/**\n * @public\n */\nexport type TechDocsReaderPageProps = {\n entityRef?: CompoundEntityRef;\n children?: TechDocsReaderPageRenderFunction | ReactNode;\n overrideThemeOptions?: Partial<ThemeOptions>;\n};\n\n/**\n * Styled Backstage Page that fills available vertical space\n */\nconst StyledPage = styled(Page)({\n height: 'inherit',\n overflowY: 'visible',\n});\n\n/**\n * An addon-aware implementation of the TechDocsReaderPage.\n *\n * @public\n */\nexport const TechDocsReaderPage = (props: TechDocsReaderPageProps) => {\n const currentTheme = useTheme();\n\n const readerPageTheme = useMemo(\n () =>\n createTheme({\n ...currentTheme,\n ...(props.overrideThemeOptions || {}),\n }),\n [currentTheme, props.overrideThemeOptions],\n );\n\n const { kind, name, namespace } = useRouteRefParams(rootDocsRouteRef);\n const { children, entityRef = { kind, name, namespace } } = props;\n\n const outlet = useOutlet();\n\n const memoizedEntityRef = useMemo(\n () => ({\n kind: entityRef.kind,\n name: entityRef.name,\n namespace: entityRef.namespace,\n }),\n [entityRef.kind, entityRef.name, entityRef.namespace],\n );\n\n // Check for external TechDocs redirects and handle navigation\n const { shouldShowProgress } = useExternalRedirect(memoizedEntityRef);\n\n const page: ReactNode = useMemo(() => {\n if (children) {\n return null;\n }\n\n const childrenList = outlet ? Children.toArray(outlet.props.children) : [];\n\n const grandChildren = childrenList.flatMap<ReactElement>(\n child => (child as ReactElement)?.props?.children ?? [],\n );\n\n return grandChildren.find(\n grandChild =>\n !getComponentData(grandChild, TECHDOCS_ADDONS_WRAPPER_KEY) &&\n !getComponentData(grandChild, TECHDOCS_ADDONS_KEY),\n );\n }, [children, outlet]);\n\n // Show full-page loading spinner when checking for external redirects or about to redirect.\n // This replaces the entire page content (header, sidebar, and documentation).\n if (shouldShowProgress) {\n return <Progress />;\n }\n\n // As explained above, \"page\" is configuration 4 and <TechDocsReaderLayout> is 1\n if (!children) {\n return (\n <ThemeProvider theme={readerPageTheme}>\n <CookieAuthRefreshProvider pluginId=\"techdocs\">\n <TechDocsReaderPageProvider entityRef={memoizedEntityRef}>\n {(page as JSX.Element) || <TechDocsReaderLayout />}\n </TechDocsReaderPageProvider>\n </CookieAuthRefreshProvider>\n </ThemeProvider>\n );\n }\n\n // As explained above, a render function is configuration 3 and React element is 2\n return (\n <ThemeProvider theme={readerPageTheme}>\n <CookieAuthRefreshProvider pluginId=\"techdocs\">\n <TechDocsReaderPageProvider entityRef={memoizedEntityRef}>\n {({ metadata, entityMetadata, onReady }) => (\n <StyledPage\n themeId=\"documentation\"\n className=\"techdocs-reader-page\"\n >\n {children instanceof Function\n ? children({\n entityRef: memoizedEntityRef,\n techdocsMetadataValue: metadata.value,\n entityMetadataValue: entityMetadata.value,\n onReady,\n })\n : children}\n </StyledPage>\n )}\n </TechDocsReaderPageProvider>\n </CookieAuthRefreshProvider>\n </ThemeProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;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,0BAAA,EAAA,EAA2B,WAAW,iBAAA,EACpC,QAAA,EAAA,CAAC,EAAE,QAAA,EAAU,cAAA,EAAgB,SAAQ,qBACpC,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAQ,eAAA;AAAA,MACR,SAAA,EAAU,sBAAA;AAAA,MAET,QAAA,EAAA,QAAA,YAAoB,WACjB,QAAA,CAAS;AAAA,QACP,SAAA,EAAW,iBAAA;AAAA,QACX,uBAAuB,QAAA,CAAS,KAAA;AAAA,QAChC,qBAAqB,cAAA,CAAe,KAAA;AAAA,QACpC;AAAA,OACD,CAAA,GACD;AAAA;AAAA,GACN,EAEJ,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
@@ -0,0 +1,49 @@
1
+ import { useRef, useEffect } from 'react';
2
+ import { useNavigate } from 'react-router-dom';
3
+ import useAsync from 'react-use/esm/useAsync';
4
+ import { useApi, useRouteRef } from '@backstage/core-plugin-api';
5
+ import { catalogApiRef } from '@backstage/plugin-catalog-react';
6
+ import { stringifyEntityRef } from '@backstage/catalog-model';
7
+ import { buildTechDocsURL } from '@backstage/plugin-techdocs-react';
8
+ import { TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';
9
+ import { rootDocsRouteRef } from '../../../routes.esm.js';
10
+
11
+ function useExternalRedirect(entityRef) {
12
+ const catalogApi = useApi(catalogApiRef);
13
+ const navigate = useNavigate();
14
+ const viewTechdocLink = useRouteRef(rootDocsRouteRef);
15
+ const entityKey = stringifyEntityRef(entityRef);
16
+ const checkedEntityRef = useRef(null);
17
+ const shouldCheckForRedirect = checkedEntityRef.current !== entityKey;
18
+ const externalRedirectResult = useAsync(async () => {
19
+ try {
20
+ const catalogEntity = await catalogApi.getEntityByRef(entityRef);
21
+ if (catalogEntity?.metadata?.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {
22
+ return buildTechDocsURL(catalogEntity, viewTechdocLink);
23
+ }
24
+ } catch (error) {
25
+ }
26
+ return void 0;
27
+ }, [entityKey, catalogApi]);
28
+ useEffect(() => {
29
+ if (!externalRedirectResult.loading && externalRedirectResult.value) {
30
+ navigate(externalRedirectResult.value, { replace: true });
31
+ }
32
+ if (!externalRedirectResult.loading && !externalRedirectResult.value) {
33
+ checkedEntityRef.current = entityKey;
34
+ }
35
+ }, [
36
+ externalRedirectResult.loading,
37
+ externalRedirectResult.value,
38
+ navigate,
39
+ entityKey
40
+ ]);
41
+ const shouldShowProgress = shouldCheckForRedirect && externalRedirectResult.loading || !!externalRedirectResult.value;
42
+ return {
43
+ loading: externalRedirectResult.loading,
44
+ shouldShowProgress
45
+ };
46
+ }
47
+
48
+ export { useExternalRedirect };
49
+ //# sourceMappingURL=useExternalRedirect.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExternalRedirect.esm.js","sources":["../../../../src/reader/components/TechDocsReaderPage/useExternalRedirect.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsync from 'react-use/esm/useAsync';\nimport { useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport {\n CompoundEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { buildTechDocsURL } from '@backstage/plugin-techdocs-react';\nimport { TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';\nimport { rootDocsRouteRef } from '../../../routes';\n\n/**\n * Hook to handle external TechDocs redirects based on entity annotations.\n * Checks if an entity has the `backstage.io/techdocs-entity` annotation and\n * redirects to the external TechDocs URL if present.\n *\n * @param entityRef - The entity reference to check for external redirects\n * @returns Object containing loading state and whether a redirect is in progress\n *\n * @internal\n */\nexport function useExternalRedirect(entityRef: CompoundEntityRef): {\n loading: boolean;\n shouldShowProgress: boolean;\n} {\n const catalogApi = useApi(catalogApiRef);\n const navigate = useNavigate();\n const viewTechdocLink = useRouteRef(rootDocsRouteRef);\n\n // Create a stable string key for the entity to use as a dependency.\n // This ensures the useAsync hook only re-runs when the entity changes,\n // preventing redundant API calls during sub-page navigation within the same entity's documentation.\n const entityKey = stringifyEntityRef(entityRef);\n // Track which entity we've already checked to avoid redundant checks\n // when navigating between pages within the same entity's documentation.\n const checkedEntityRef = useRef<string | null>(null);\n const shouldCheckForRedirect = checkedEntityRef.current !== entityKey;\n\n // Check if this entity should redirect to external TechDocs\n const externalRedirectResult = useAsync(async () => {\n try {\n const catalogEntity = await catalogApi.getEntityByRef(entityRef);\n\n if (\n catalogEntity?.metadata?.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) {\n return buildTechDocsURL(catalogEntity, viewTechdocLink);\n }\n } catch (error) {\n // Ignore errors and allow the current entity's TechDocs to load.\n // This handles cases where the catalog API is unavailable or the entity doesn't exist.\n }\n\n return undefined;\n }, [entityKey, catalogApi]);\n\n useEffect(() => {\n // Navigate to external TechDocs if a redirect URL is available\n if (!externalRedirectResult.loading && externalRedirectResult.value) {\n navigate(externalRedirectResult.value, { replace: true });\n }\n\n // Mark entity as checked once we've determined there's no redirect needed.\n // This prevents the entire page from unmounting/remounting (showing Progress spinner)\n // on subsequent sub-page navigation within the same entity.\n if (!externalRedirectResult.loading && !externalRedirectResult.value) {\n checkedEntityRef.current = entityKey;\n }\n }, [\n externalRedirectResult.loading,\n externalRedirectResult.value,\n navigate,\n entityKey,\n ]);\n\n // Determine if we should show a loading indicator (which replaces the entire page with a Progress spinner).\n // Only show it when: 1) checking a new/unchecked entity, or 2) we have a redirect URL and are navigating.\n const shouldShowProgress =\n (shouldCheckForRedirect && externalRedirectResult.loading) ||\n !!externalRedirectResult.value;\n\n return {\n loading: externalRedirectResult.loading,\n shouldShowProgress,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AAuCO,SAAS,oBAAoB,SAAA,EAGlC;AACA,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,eAAA,GAAkB,YAAY,gBAAgB,CAAA;AAKpD,EAAA,MAAM,SAAA,GAAY,mBAAmB,SAAS,CAAA;AAG9C,EAAA,MAAM,gBAAA,GAAmB,OAAsB,IAAI,CAAA;AACnD,EAAA,MAAM,sBAAA,GAAyB,iBAAiB,OAAA,KAAY,SAAA;AAG5D,EAAA,MAAM,sBAAA,GAAyB,SAAS,YAAY;AAClD,IAAA,IAAI;AACF,MAAA,MAAM,aAAA,GAAgB,MAAM,UAAA,CAAW,cAAA,CAAe,SAAS,CAAA;AAE/D,MAAA,IACE,aAAA,EAAe,QAAA,EAAU,WAAA,GAAc,4BAA4B,CAAA,EACnE;AACA,QAAA,OAAO,gBAAA,CAAiB,eAAe,eAAe,CAAA;AAAA,MACxD;AAAA,IACF,SAAS,KAAA,EAAO;AAAA,IAGhB;AAEA,IAAA,OAAO,MAAA;AAAA,EACT,CAAA,EAAG,CAAC,SAAA,EAAW,UAAU,CAAC,CAAA;AAE1B,EAAA,SAAA,CAAU,MAAM;AAEd,IAAA,IAAI,CAAC,sBAAA,CAAuB,OAAA,IAAW,sBAAA,CAAuB,KAAA,EAAO;AACnE,MAAA,QAAA,CAAS,sBAAA,CAAuB,KAAA,EAAO,EAAE,OAAA,EAAS,MAAM,CAAA;AAAA,IAC1D;AAKA,IAAA,IAAI,CAAC,sBAAA,CAAuB,OAAA,IAAW,CAAC,uBAAuB,KAAA,EAAO;AACpE,MAAA,gBAAA,CAAiB,OAAA,GAAU,SAAA;AAAA,IAC7B;AAAA,EACF,CAAA,EAAG;AAAA,IACD,sBAAA,CAAuB,OAAA;AAAA,IACvB,sBAAA,CAAuB,KAAA;AAAA,IACvB,QAAA;AAAA,IACA;AAAA,GACD,CAAA;AAID,EAAA,MAAM,qBACH,sBAAA,IAA0B,sBAAA,CAAuB,OAAA,IAClD,CAAC,CAAC,sBAAA,CAAuB,KAAA;AAE3B,EAAA,OAAO;AAAA,IACL,SAAS,sBAAA,CAAuB,OAAA;AAAA,IAChC;AAAA,GACF;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-techdocs",
3
- "version": "1.15.1",
3
+ "version": "1.15.2-next.0",
4
4
  "description": "The Backstage plugin that renders technical documentation for your components",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -71,23 +71,23 @@
71
71
  "test": "backstage-cli package test"
72
72
  },
73
73
  "dependencies": {
74
- "@backstage/catalog-client": "^1.12.0",
75
- "@backstage/catalog-model": "^1.7.5",
76
- "@backstage/config": "^1.3.5",
77
- "@backstage/core-compat-api": "^0.5.3",
78
- "@backstage/core-components": "^0.18.2",
79
- "@backstage/core-plugin-api": "^1.11.1",
80
- "@backstage/errors": "^1.2.7",
81
- "@backstage/frontend-plugin-api": "^0.12.1",
82
- "@backstage/integration": "^1.18.1",
83
- "@backstage/integration-react": "^1.2.11",
84
- "@backstage/plugin-auth-react": "^0.1.20",
85
- "@backstage/plugin-catalog-react": "^1.21.2",
86
- "@backstage/plugin-search-common": "^1.2.20",
87
- "@backstage/plugin-search-react": "^1.9.5",
88
- "@backstage/plugin-techdocs-common": "^0.1.1",
89
- "@backstage/plugin-techdocs-react": "^1.3.4",
90
- "@backstage/theme": "^0.7.0",
74
+ "@backstage/catalog-client": "1.12.1-next.0",
75
+ "@backstage/catalog-model": "1.7.6-next.0",
76
+ "@backstage/config": "1.3.6-next.0",
77
+ "@backstage/core-compat-api": "0.5.4-next.0",
78
+ "@backstage/core-components": "0.18.3-next.0",
79
+ "@backstage/core-plugin-api": "1.11.2-next.0",
80
+ "@backstage/errors": "1.2.7",
81
+ "@backstage/frontend-plugin-api": "0.12.2-next.0",
82
+ "@backstage/integration": "1.18.2-next.0",
83
+ "@backstage/integration-react": "1.2.12-next.0",
84
+ "@backstage/plugin-auth-react": "0.1.21-next.0",
85
+ "@backstage/plugin-catalog-react": "1.21.3-next.0",
86
+ "@backstage/plugin-search-common": "1.2.21-next.0",
87
+ "@backstage/plugin-search-react": "1.9.6-next.0",
88
+ "@backstage/plugin-techdocs-common": "0.1.1",
89
+ "@backstage/plugin-techdocs-react": "1.3.5-next.0",
90
+ "@backstage/theme": "0.7.0",
91
91
  "@material-ui/core": "^4.12.2",
92
92
  "@material-ui/icons": "^4.9.1",
93
93
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -101,12 +101,12 @@
101
101
  "react-use": "^17.2.4"
102
102
  },
103
103
  "devDependencies": {
104
- "@backstage/cli": "^0.34.4",
105
- "@backstage/core-app-api": "^1.19.1",
106
- "@backstage/dev-utils": "^1.1.15",
107
- "@backstage/plugin-catalog": "^1.31.4",
108
- "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.29",
109
- "@backstage/test-utils": "^1.7.12",
104
+ "@backstage/cli": "0.34.5-next.0",
105
+ "@backstage/core-app-api": "1.19.2-next.0",
106
+ "@backstage/dev-utils": "1.1.17-next.0",
107
+ "@backstage/plugin-catalog": "1.31.5-next.0",
108
+ "@backstage/plugin-techdocs-module-addons-contrib": "1.1.30-next.0",
109
+ "@backstage/test-utils": "1.7.13-next.0",
110
110
  "@testing-library/dom": "^10.0.0",
111
111
  "@testing-library/jest-dom": "^6.0.0",
112
112
  "@testing-library/react": "^16.0.0",