Skip to content

🚀 tech-insights: Make plugin customizable in new frontend system #7005

@simondose1012

Description

@simondose1012

Workspace

tech-insights

🔖 Feature description

The tech-insights scorecards should be customizable in the new frontend system.

This used to be possible by calling the old frontend system's components with self-defined props. In the new frontend system, it is currently not possible to customize the passed props without exchanging the whole component with a self-written one because the used JSX components are not exported.

🎤 Context

You should be able to customize e.g. the checksId like this:

techInsightsPlugin.withOverrides({
  extensions: [
    techInsightsPlugin.getExtension('entity-content:tech-insights/scorecards').override({
      params: {
        loader: () =>
          import('@backstage-community/plugin-tech-insights/alpha').then(m => {
            return compatWrapper(
              <m.ScorecardsContent title="Scorecards" checksId={[/* ... */]} />,
            );
          }),
      },
    }),
  ],
});

✌️ Possible Implementation

Export the components.

tech-insights/plugins/tech-insights/src/components/index.ts:

export * from './ScorecardsBadge';
export * from './ScorecardsCard';
export * from './ScorecardsContent';
export * from './ScorecardsGauge';
export * from './ScorecardsInfo';
export * from './ScorecardsList';
export * from './ScorecardsPage';

tech-insights/plugins/tech-insights/src/alpha/index.ts:

// ...

export * from '../components';

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestworkspace/tech-insightsUsed to tag tech-insights workspace issues and pull requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions