Merge pull request #4606 from adamdmharvey/scaff-maint

chore(scaffolder): Update loading/error messaging and remove unused deps
This commit is contained in:
Adam Harvey
2021-02-19 16:27:48 -05:00
committed by GitHub
3 changed files with 22 additions and 11 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder': patch
---
Update messages that process during loading, error, and no templates found.
Remove unused dependencies.
-1
View File
@@ -45,7 +45,6 @@
"git-url-parse": "^11.4.4",
"humanize-duration": "^3.25.1",
"luxon": "^1.25.0",
"moment": "^2.26.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-lazylog": "^4.5.2",
@@ -156,21 +156,27 @@ export const ScaffolderPageContents = () => {
<ResultsFilter availableCategories={availableCategories} />
</div>
<div>
{!matchingEntities && loading && <Progress />}
{matchingEntities && !matchingEntities.length && (
<Typography variant="body2">
Shoot! Looks like you don't have any templates. Check out the
documentation{' '}
<Link href="https://backstage.io/docs/features/software-templates/adding-templates">
here!
</Link>
</Typography>
)}
{loading && <Progress />}
{error && (
<WarningPanel title="Oops! Something went wrong loading the templates">
{error.message}
</WarningPanel>
)}
{!error &&
!loading &&
matchingEntities &&
!matchingEntities.length && (
<Typography variant="body2">
No templates found that match your filter. Learn more about{' '}
<Link href="https://backstage.io/docs/features/software-templates/adding-templates">
adding templates
</Link>
.
</Typography>
)}
<Grid container>
{matchingEntities &&
matchingEntities?.length > 0 &&