Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: new frontend system legacy plugin converter #24707

Open
2 tasks done
marleypowell opened this issue May 9, 2024 · 1 comment
Open
2 tasks done

馃殌 Feature: new frontend system legacy plugin converter #24707

marleypowell opened this issue May 9, 2024 · 1 comment
Labels
enhancement New feature or request frontend-system

Comments

@marleypowell
Copy link
Contributor

馃敄 Feature description

The @backstage/core-compat-api package seems to exist to provide compatibility for the new frontend system. It seems like the bridge for existing plugins is missing. This may have been intentional but it seems possible?

馃帳 Context

This would allow existing plugins to be used with the new frontend system.

鉁岋笍 Possible Implementation

function convertLegacyPlugin(plugin: BackstagePlugin) {
  return createPlugin({
    id: plugin.getId(),
    extensions: Array.from(plugin.getApis()).map(factory =>
      createApiExtension({
        factory,
      }),
    ),
    routes: convertLegacyRouteRefs(plugin.routes),
    externalRoutes: convertLegacyRouteRefs(plugin.externalRoutes),
    featureFlags: Array.from(plugin.getFeatureFlags()),
  });
}
const app = createApp({
  features: [
    ...legacyFeatures,
    convertLegacyPlugin(catalogUnprocessedEntitiesPlugin)
  ],
});

馃憖 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!

@marleypowell marleypowell added the enhancement New feature or request label May 9, 2024
@Rugvip
Copy link
Member

Rugvip commented May 10, 2024

Yep we'll likely look at adding this! 馃憤

The tricky bit are the extensions being provided through plugin.provide(...) in the old system, and how to handle those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend-system
Projects
None yet
Development

No branches or pull requests

3 participants