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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New plugin: Manage #2569

Merged
merged 1 commit into from
Feb 24, 2025
Merged

New plugin: Manage #2569

merged 1 commit into from
Feb 24, 2025

Conversation

grantila
Copy link
Contributor

Manage page plugin

This PR adds a workspace for a plugin that shows a page with relevant information to developers - the components (and other entities) they and their teams own, and possibly other functionality, analytics, statistics etc.

Having worked at Spotify, I often used the Manage page shown in the Introduction to Backstage video (beginning at 10:30, or jump straight to 15:00). It's a really useful plugin that quickly becomes the go to page to see things relevant for you.

This is an attempt to mimic the functionality of that page, and make it customizable and extendable to implementors.

Introduction

The plugin provides a default set of tabs showing entities owned by the user and their teams. It also comes with an Organization view that can be added as a tab, showing the group hierarchy for the user, and their starred entities (both optional).

An implementor can add custom tabs before and after these default tabs, and the Settings tab (unless disabled) allows the user to customize the order of those tabs to what suits them (stored in user settings).

An implementor can add custom components above and below the entity tables, and those components can use hooks to know what kind and what entities are being displayed, to fetch information about those entities from the backend and maybe aggregate data about them.

Extending

Most of this page is customizable, and there are plenty of hooks to use to build custom components and functionality. There are hooks for getting the users groups, the owned entities, the starred entities, etc. These hooks can be used anywhere in the page.

There are other hooks that can only be used in the tabs showing entities, for that particular kind.

The tables showing entities can be extended with custom columns. This PR contains a plugin module for tech-insights, which shows tech-insights checks in individual columns or aggregated into one column (which is more visually friendly if there are very many checks for certain kinds).

An extension to the manage page can register itself (as an API ref) to the Manage page API and provide a React Provider that will be injected into the tab for a certain kind. This allows an implementor to build custom columns that can use a Provider (rendered outside the table) for fetching the data, instead of fetching data in each and every row/column component. This is used in the tech-insights module for reference, and improves performance drastically.

Examples

Components (showing multiple tech-insights in one column)
components
Components (expanded tech-insights and hovering a column)
components-expanded
Systems (showing tech-insight checks one per column)
systems
Combining all entities into one view
combined
Settings
settings

Usage

Please look at the README's for the individual plugins in this PR to understand more about them.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Sorry, something went wrong.

@grantila grantila requested review from backstage-service and a team as code owners January 23, 2025 11:42
@grantila grantila requested a review from BethGriggs January 23, 2025 11:42
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Jan 23, 2025

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @backstage-community/plugin-manage-module-tech-insights
  • @backstage-community/plugin-manage-react
  • @backstage-community/plugin-manage

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/manage/packages/app none v0.0.11
backend workspaces/manage/packages/backend none v0.0.11
@backstage-community/plugin-manage-module-tech-insights workspaces/manage/plugins/manage-module-tech-insights none v0.1.0
@backstage-community/plugin-manage-react workspaces/manage/plugins/manage-react none v0.1.0
@backstage-community/plugin-manage workspaces/manage/plugins/manage none v0.1.0

@grantila grantila force-pushed the grantila/manage-page branch from ee9ba55 to 3983e5b Compare January 23, 2025 11:44
@kurtaking
Copy link
Member

Is there anything preventing contributing the tech-insights related pieces back to the core workspace?

@grantila
Copy link
Contributor Author

grantila commented Jan 24, 2025

Not at all @kurtaking, perhaps that would make more sense to do, right in this PR? Moving it to the tech-insights workspace that is.

EDIT:
Just realized that the initial code wouldn't build, as this module depends on the plugin-manage-react package, which hasn't been built and published yet.
Perhaps it makes more sense to move it once this is in.

@grantila grantila force-pushed the grantila/manage-page branch 4 times, most recently from a891b8c to 6e833d5 Compare January 24, 2025 13:42
@grantila
Copy link
Contributor Author

Fixed missing api-reports.

Now, I'm not sure what the failure of yarn backstage-cli repo fix --check --publish means. It says "run yarn fix" to fix this, but yarn fix does nothing 🤔

@kurtaking
Copy link
Member

Not at all @kurtaking, perhaps that would make more sense to do, right in this PR? Moving it to the tech-insights workspace that is.

EDIT: Just realized that the initial code wouldn't build, as this module depends on the plugin-manage-react package, which hasn't been built and published yet. Perhaps it makes more sense to move it once this is in.

I mention this because #2464 is about to be merged. What I've noticed is there are a lot of people trying to tackle the concept of scorecards, aggregated insights, rollups, etc, including myself.

I was already exploring opportunities to contribute what we have internally upstream, so I'm pushing for the reusable, tech-insights pieces to get integrated directly into the core plugins.

For example, There would still be the manage plugins, but you would import he tech insights components and apis from a tech-insights-react plugin which currently doesn't exist.

@kurtaking
Copy link
Member

Fixed missing api-reports.

Now, I'm not sure what the failure of yarn backstage-cli repo fix --check --publish means. It says "run yarn fix" to fix this, but yarn fix does nothing 🤔

Try yarn backstage-cli repo fix --publish without the --check. I added some details to the migration steps when moving over the announcements plugins.

@grantila grantila force-pushed the grantila/manage-page branch from 6e833d5 to 385cdf6 Compare January 25, 2025 07:39
@grantila
Copy link
Contributor Author

Thanks @kurtaking, that solved it!

I agree that reusable components from something like plugin-tech-insights-react would be great. There isn't much of that in this PR, but perhaps the small gauges with a tooltip, shown in the second screenshot.

Let's first try to get this in though, the vast majority of this PR is not tech-insights related - it's just the first module for the manage plugin. Preferably we'd have columns (and possibly aggregated statistics/metrics) provided by other plugins, e.g. kubernetes.

@kurtaking
Copy link
Member

Thanks @kurtaking, that solved it!

Nice, glad to hear 🎉

Copy link
Member

@vinzscam vinzscam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! 🙏

@grantila
Copy link
Contributor Author

grantila commented Feb 5, 2025

Thanks for the review! I just applied the changes.

Copy link
Collaborator

@BethGriggs BethGriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for review the delay 🙏🏻 , just a couple of non-blocking queries

@grantila grantila force-pushed the grantila/manage-page branch from e5408a6 to 146be85 Compare February 20, 2025 09:50
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
@grantila grantila force-pushed the grantila/manage-page branch from 146be85 to 66bf067 Compare February 20, 2025 13:07
@grantila
Copy link
Contributor Author

grantila commented Feb 20, 2025

@vinzscam @BethGriggs I now fixed the code/packing to the great comments you had, squashed the commits and rebased on main.

Copy link
Collaborator

@BethGriggs BethGriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the initial merge

@vinzscam
Copy link
Member

let's go :shipit:

@vinzscam vinzscam merged commit 78f2046 into backstage:main Feb 24, 2025
12 checks passed
snaquekiller pushed a commit to snaquekiller/community-plugins that referenced this pull request Feb 27, 2025
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
Signed-off-by: Guitton Nicolas <nguitton@cegid.com>
CryptoRodeo pushed a commit to CryptoRodeo/community-plugins that referenced this pull request Mar 4, 2025
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants