chore: cleanup todos

Signed-off-by: benjdlambert <ben@blam.sh>

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-08-06 10:40:52 +02:00
parent a70b6862e7
commit 5775f10d14
4 changed files with 16 additions and 27 deletions
+8 -15
View File
@@ -25,14 +25,10 @@ import { BackstageIdentityResponse } from '@backstage/core-plugin-api';
import { BackstageUserIdentity } from '@backstage/core-plugin-api';
import { bitbucketAuthApiRef } from '@backstage/core-plugin-api';
import { bitbucketServerAuthApiRef } from '@backstage/core-plugin-api';
import { ComponentRef as ComponentRef_2 } from '@backstage/frontend-plugin-api';
import { ComponentType } from 'react';
import { ConfigApi } from '@backstage/core-plugin-api';
import { configApiRef } from '@backstage/core-plugin-api';
import { ConfigurableExtensionDataRef as ConfigurableExtensionDataRef_2 } from '@backstage/frontend-plugin-api';
import { CoreErrorBoundaryFallbackProps as CoreErrorBoundaryFallbackProps_2 } from '@backstage/frontend-plugin-api';
import { CoreNotFoundErrorPageProps as CoreNotFoundErrorPageProps_2 } from '@backstage/frontend-plugin-api';
import { CoreProgressProps as CoreProgressProps_2 } from '@backstage/frontend-plugin-api';
import { createApiFactory } from '@backstage/core-plugin-api';
import { createApiRef } from '@backstage/core-plugin-api';
import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
@@ -958,11 +954,11 @@ export { errorApiRef };
// @public (undocumented)
export const ErrorBoundary: ((
props: CoreErrorBoundaryFallbackProps_2,
props: CoreErrorBoundaryFallbackProps,
) => JSX.Element) & {
ref: ComponentRef_2<
CoreErrorBoundaryFallbackProps_2,
CoreErrorBoundaryFallbackProps_2
ref: ComponentRef<
CoreErrorBoundaryFallbackProps,
CoreErrorBoundaryFallbackProps
>;
};
@@ -1623,12 +1619,9 @@ export const NavItemBlueprint: ExtensionBlueprint<{
// @public (undocumented)
export const NotFoundErrorPage: ((
props: CoreNotFoundErrorPageProps_2,
props: CoreNotFoundErrorPageProps,
) => JSX.Element) & {
ref: ComponentRef_2<
CoreNotFoundErrorPageProps_2,
CoreNotFoundErrorPageProps_2
>;
ref: ComponentRef<CoreNotFoundErrorPageProps, CoreNotFoundErrorPageProps>;
};
export { OAuthApi };
@@ -1716,8 +1709,8 @@ export { ProfileInfo };
export { ProfileInfoApi };
// @public (undocumented)
export const Progress: ((props: CoreProgressProps_2) => JSX.Element) & {
ref: ComponentRef_2<CoreProgressProps_2, CoreProgressProps_2>;
export const Progress: ((props: CoreProgressProps) => JSX.Element) & {
ref: ComponentRef<CoreProgressProps, CoreProgressProps>;
};
// @public
@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
CoreErrorBoundaryFallbackProps,
CoreNotFoundErrorPageProps,
CoreProgressProps,
createAdaptableComponent,
} from '@backstage/frontend-plugin-api';
} from '../types';
import { createAdaptableComponent } from './createAdaptableComponent';
/**
* @public
@@ -29,6 +29,7 @@ import { AppNode } from '../apis';
import { Progress } from '@backstage/core-components';
import { coreExtensionData } from '../wiring';
import { AppNodeProvider } from './AppNodeProvider';
import { ErrorBoundary as ErrorBoundaryComponent } from './DefaultAdaptableComponents';
type RouteTrackerProps = PropsWithChildren<{
enabled?: boolean;
@@ -67,9 +68,6 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
const plugin = node.spec.plugin;
// todo: fallback
const fallback = () => <div>Fallback</div>;
// Skipping "routeRef" attribute in the new system, the extension "id" should provide more insight
const attributes = {
extensionId: node.spec.id,
@@ -79,7 +77,7 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
return (
<AppNodeProvider node={node}>
<Suspense fallback={<Progress />}>
<ErrorBoundary plugin={plugin} Fallback={fallback}>
<ErrorBoundary plugin={plugin} Fallback={ErrorBoundaryComponent}>
<AnalyticsContext attributes={attributes}>
<RouteTracker enabled={hasRoutePathOutput}>{children}</RouteTracker>
</AnalyticsContext>