fix(scaffolder): requested changes
Signed-off-by: Zander Franks <zander@zanderf.net>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-common': patch
|
||||
'@backstage/plugin-scaffolder-react': patch
|
||||
'@backstage/plugin-scaffolder-common': minor
|
||||
'@backstage/plugin-scaffolder-react': minor
|
||||
---
|
||||
|
||||
Add support for Markdown text blob outputs from templates
|
||||
|
||||
@@ -522,8 +522,8 @@ output:
|
||||
icon: catalog
|
||||
entityRef: ${{ steps['register'].output.entityRef }} # link to the entity that has been ingested to the catalog
|
||||
text:
|
||||
- title: More data
|
||||
data: |
|
||||
- title: More information
|
||||
content: |
|
||||
Access the \[remote repository\](${{ steps['publish'].output.remoteUrl }}).
|
||||
```
|
||||
|
||||
|
||||
@@ -221,15 +221,15 @@
|
||||
},
|
||||
"text": {
|
||||
"type": "array",
|
||||
"description": "A list of text blobs, like output data from the template.",
|
||||
"description": "A list of Markdown text blobs, like output data from the template.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"description": "A user friendly display name for the text blob.",
|
||||
"examples": ["Output Data"],
|
||||
"description": "A user friendly display name for the text.",
|
||||
"examples": ["Output Content"],
|
||||
"minLength": 1
|
||||
},
|
||||
"icon": {
|
||||
@@ -238,10 +238,10 @@
|
||||
"examples": ["dashboard"],
|
||||
"minLength": 1
|
||||
},
|
||||
"data": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "The text blob to display in the UI.",
|
||||
"examples": ["{}"]
|
||||
"description": "The text blob to display in the UI, rendered as Markdown.",
|
||||
"examples": ["**hey** _I'm_ Markdown"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ export type ScaffolderOutputLink = {
|
||||
export type ScaffolderOutputText = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
data?: string;
|
||||
content?: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
|
||||
@@ -88,7 +88,7 @@ export type ScaffolderOutputLink = {
|
||||
export type ScaffolderOutputText = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
data?: string;
|
||||
content?: string;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ export const DefaultTemplateOutputs = (props: {
|
||||
titleTypographyProps={{ component: 'h2' }}
|
||||
>
|
||||
<Box padding={2} height="100%">
|
||||
<MarkdownContent content={textOutput.data ?? ''} />
|
||||
<MarkdownContent content={textOutput.content ?? ''} />
|
||||
</Box>
|
||||
</InfoCard>
|
||||
</Box>
|
||||
|
||||
@@ -38,7 +38,7 @@ export const TextOutputs = (props: {
|
||||
return (
|
||||
<>
|
||||
{text
|
||||
.filter(({ data }) => data)
|
||||
.filter(({ content }) => content !== undefined)
|
||||
.map(({ title, icon }, i) => {
|
||||
const Icon = iconResolver(icon);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user