Allow Entity List Passed Through
Hey, I just made a Pull Request!
Related to issue: Bazaar: Entity List Not Passed Through React Components
With this change, a list of catalogEntities passed into ProjectPreview will pass all the way through to the HomePageBazaarInfoCard, which means that if a custom list of components was originally passed in, only those list of components (unlinked) will appear as link options.
Consider a case where the application should only allow Components, not Resources, to be assigned as the Entity for a Bazaar project:
Old Behavior / using SortView without passing in the optional allCatalogEntities:
New Behavior / passing allCatalogEntities into SortView:
:heavy_check_mark: Checklist
Changed Packages
| Package Name | Package Path | Changeset Bump | Current Version |
|---|---|---|---|
| @backstage-community/plugin-bazaar | workspaces/bazaar/plugins/bazaar | patch | v0.13.0 |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
@vinzscam apologies for the delay, but I've made some changes to allow an optional filter to be passed through the components as well, and added both this and the catalogEntities functionality to be passed into the BazaarOverviewCard as well!
As I added in the PR description:
I've allowed either a list of catalogEntities or a filter EntityFilterQuery object to be passed in through these components. As the props documentation says, catalogEntities will always take priority. For examples:
- If a user passes in a list of catalogEntities to display as the entity link options, those are what will display.
- If they omit catalogEntities and pass in a custom filter, then fetchCatalogItems will use the passed in filter.
- If both are omitted, fetchCatalogItems will proceed as previously written with defaulting to Component and Resource kinds.
- If they pass in both, catalogEntities will take priority.
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!