backstage icon indicating copy to clipboard operation
backstage copied to clipboard

🚀 Feature: Use the Catalog presentation API

Open freben opened this issue 3 years ago • 36 comments

🔖 Feature description

Now that #17474 is merged, let's use the presentation APIs all over the place! This should help with ensuring that entities are presented uniformly with their titles / display names / etc, and with the same iconography everywhere if applicable.

🎤 Context

See #17474

✌️ Possible Implementation

Places in the code that use EntityRefLink/EntityRefLinks are already covered.

All humanizeEntityRef and humanizeEntity call sites have been removed (see #33576, #33386, #33818). Only the deprecated definitions and re-exports remain in @backstage/plugin-catalog-react.

The remaining work is migrating places that directly access metadata.title, spec.profile.displayName, or plain metadata.name for display purposes. Those should use the EntityDisplayName React component if possible, or entityPresentationSnapshot in non-React contexts.

We'd appreciate the help with digging through the Backstage core and plugins, finding places where the presentation API should be used.

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

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

freben avatar Nov 03 '23 09:11 freben

Hi there, could I take up this one? Thanks!

hainenber avatar Nov 04 '23 09:11 hainenber

It's free for anyone to chip away at! Several small PRs is probably better than one large - easier to review. And it's probably going to take a few stabs before it's complete so may be worth not assigning to a single person perhaps 🤔

freben avatar Nov 04 '23 13:11 freben

I see, I was acquainted with other projects to ask for assignment firstly and not aware of contribution etiquette here

Let me take a stab at it. Thanks!

hainenber avatar Nov 04 '23 16:11 hainenber

No worries, glad you asked! A lot of times we do assign to avoid trampling on each others' feet, but this one may be diverse enough to try leaving it out to begin with. Let's try and then reevaluate if needed!

freben avatar Nov 04 '23 19:11 freben

Hi @freben , I would love to help out this issue. After reviewing the codebase, I have a couple of questions.

  • Since humanizeEntityRef is a function returning a string, how is it suggested to replace EntityDisplayName, which is a React component?
  • I have lookup the place using EntityDisplayName, but I can't figure out how it related to the usage of humanizeEntityRef.

Thank you for the patience!

handsamtw avatar Nov 13 '23 20:11 handsamtw

Hi!

Yeah as I alluded to in the issue description "There are some cases where you aren't yet in a React tree"; those cases may need some rewriting where possible (moving work out of a function and instead into a child helper component or similar), or if you find that this isn't working out at all, we'd like to see examples of those cases to see if there's something we should do to extend or alter the API interface to cater to those cases.

Essentially, the desired end result is that there's no custom rendering of humanizeEntityRef or plain metadat.name and similar anywhere. Getting all the way there may or may not need alterations to the presentation API.

EDIT: https://github.com/backstage/backstage/pull/24595 adds the promise based API

freben avatar Nov 15 '23 11:11 freben

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 14 '24 12:01 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 14 '24 14:03 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 01 '24 14:07 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 30 '24 20:08 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 16 '24 13:12 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 17 '25 10:02 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 21 '25 10:04 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 30 '25 22:06 github-actions[bot]

@freben any major use cases left in here before we consider this done?

MihaiTabara avatar Jul 03 '25 15:07 MihaiTabara

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 01 '25 15:09 github-actions[bot]

Hello 👋

I would love to contribute to this, if it is still being worked on.

I saw it has been stale since long, so if this isn't a priority for now, I'm also open to contribute to any other issue.

This would be the first time I'm contributing to this project, probably not the last.

RudrakshNanavaty avatar Sep 16 '25 15:09 RudrakshNanavaty

Hey - go right ahead, there are likely still a bunch of places where this could be needed.

freben avatar Sep 16 '25 18:09 freben

Hi! I'd like to contribute to this issue.

I have hands-on experience with Backstage Catalog from my internship at MetLife where I built DevX plugins and worked with the catalog system. I'm familiar with TypeScript and React, and would love to implement the Catalog presentation API.

Could you provide guidance on:

  • Which specific components need the API integration?
  • Are there existing examples I should reference?
  • Expected timeline for review?

Thanks!

sri11223 avatar Oct 03 '25 19:10 sri11223

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 02 '25 19:12 github-actions[bot]