Skip to content

Commit 78b2f53

Browse files
authored
fix(extensions): hide extensions alerts while the plugins are still loading (#1206)
1 parent 36c64da commit 78b2f53

2 files changed

Lines changed: 34 additions & 25 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-marketplace': patch
3+
---
4+
5+
hide extensions alerts while the plugins are still loading

workspaces/marketplace/plugins/marketplace/src/components/MarketplaceCatalogContent.tsx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -163,32 +163,36 @@ export const MarketplaceCatalogContent = () => {
163163

164164
return (
165165
<>
166-
{isProductionEnvironment && (
167-
<Alert severity="info" sx={{ mb: '1rem' }}>
168-
<AlertTitle>
169-
Plugin installation is disabled in the production environment.
170-
</AlertTitle>
171-
</Alert>
172-
)}
173-
{showExtensionsConfigurationAlert && (
166+
{!filteredPlugins.isLoading && (
174167
<>
175-
<WarningPanel
176-
title="Plugin installation is disabled."
177-
defaultExpanded
178-
severity="info"
179-
message={
180-
<>
181-
Example how to enable extensions plugin installation
182-
<CodeSnippet
183-
language="yaml"
184-
showLineNumbers
185-
highlightedNumbers={generateExtensionsEnableLineNumbers()}
186-
text={EXTENSIONS_CONFIG_YAML}
187-
/>
188-
</>
189-
}
190-
/>
191-
<br />
168+
{isProductionEnvironment && (
169+
<Alert severity="info" sx={{ mb: '1rem' }}>
170+
<AlertTitle>
171+
Plugin installation is disabled in the production environment.
172+
</AlertTitle>
173+
</Alert>
174+
)}
175+
{showExtensionsConfigurationAlert && (
176+
<>
177+
<WarningPanel
178+
title="Plugin installation is disabled."
179+
defaultExpanded
180+
severity="info"
181+
message={
182+
<>
183+
Example how to enable extensions plugin installation
184+
<CodeSnippet
185+
language="yaml"
186+
showLineNumbers
187+
highlightedNumbers={generateExtensionsEnableLineNumbers()}
188+
text={EXTENSIONS_CONFIG_YAML}
189+
/>
190+
</>
191+
}
192+
/>
193+
<br />
194+
</>
195+
)}
192196
</>
193197
)}
194198
{installedPluginsCount > 0 && (

0 commit comments

Comments
 (0)