Skip to content

Commit

Permalink
Merge pull request #25341 from backstage/freben/no-about
Browse files Browse the repository at this point in the history
document suggestion to fork AboutCard if needed
  • Loading branch information
freben committed Jun 20, 2024
2 parents 2dcf021 + d133eaa commit a4cfe9d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-clocks-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---

Added small notes to AboutCard to discourage customizability PRs
2 changes: 1 addition & 1 deletion plugins/catalog/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export interface DependsOnResourcesCardProps {
variant?: InfoCardVariants;
}

// @public (undocumented)
// @public
export const EntityAboutCard: (props: AboutCardProps) => JSX.Element;

// @public (undocumented)
Expand Down
4 changes: 4 additions & 0 deletions plugins/catalog/src/components/AboutCard/AboutCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export interface AboutCardProps {

/**
* Exported publicly via the EntityAboutCard
*
* NOTE: We generally do not accept pull requests to extend this class with more
* props and cusomizability. If you need to tweak it, consider making a bespoke
* card in your own repository instead, that is perfect for your own needs.
*/
export function AboutCard(props: AboutCardProps) {
const { variant } = props;
Expand Down
13 changes: 12 additions & 1 deletion plugins/catalog/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,18 @@ export const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide(
}),
);

/** @public */
/**
* An example About card to show at the top of entity pages.
*
* @public
* @remarks
*
* This card collects some high level information about the entity, but is just
* an example component. Many organizations will want to replace it with a
* custom card that is more tailored to their specific needs. The card itself is
* not extremely customizable; feel free to make a copy of it as a starting
* point if you like.
*/
export const EntityAboutCard: (props: AboutCardProps) => JSX.Element =
catalogPlugin.provide(
createComponentExtension({
Expand Down

0 comments on commit a4cfe9d

Please sign in to comment.