Skip to content

Commit 3519a49

Browse files
committed
Skip empty streams and change Header React comp
1 parent 0644581 commit 3519a49

File tree

4 files changed

+41
-28
lines changed

4 files changed

+41
-28
lines changed

base/src/main/java/io/quarkus/code/service/PlatformService.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,12 @@ private void reloadPlatformServiceCache() throws RegistryResolutionException, IO
260260
recommended,
261261
codeQuarkusExtensions,
262262
extensionCatalog);
263-
streams.add(streamInfo);
264-
updatedStreamCatalogMap.put(streamKey, platformInfo);
263+
if (!codeQuarkusExtensions.isEmpty()) {
264+
streams.add(streamInfo);
265+
updatedStreamCatalogMap.put(streamKey, platformInfo);
266+
} else {
267+
LOG.warning("No extension found for streamKey: %s (skipping)".formatted(streamKey));
268+
}
265269
}
266270
}
267271
PlatformServiceCache newCache = new PlatformServiceCache(
@@ -311,7 +315,7 @@ private void checkNewCache(PlatformServiceCache newCache) throws IOException, Qu
311315

312316
for (Map.Entry<String, PlatformInfo> entry : newCache.streamCatalogMap().entrySet()) {
313317
if (entry.getValue().codeQuarkusExtensions().isEmpty()) {
314-
throw new RuntimeException("No extension found in the stream: " + entry.getKey());
318+
throw new IllegalStateException("No extension found in the stream: " + entry.getKey());
315319
}
316320
projectService.createTmp(
317321
entry.getValue(),

base/src/main/resources/web/lib/components/header/code-quarkus-header.scss

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
display: flex;
1919
height: 70px;
2020

21-
.nav-container {
21+
.nav-left {
22+
flex-grow: 1;
23+
height: 70px;
24+
display: flex;
25+
}
26+
27+
.nav-right {
2228
display: flex;
2329
height: 55px;
2430
line-height: 55px;
@@ -43,30 +49,28 @@
4349
}
4450
}
4551

46-
.quarkus-brand {
47-
flex-grow: 1;
48-
line-height: 70px;
52+
.brand {
4953
display: flex;
54+
align-items: center;
55+
}
5056

51-
a {
52-
display: inline-block;
53-
vertical-align: middle;
54-
margin: 0;
55-
padding: 0;
57+
a.quarkus-brand {
58+
display: inline-block;
59+
margin: 0;
60+
padding: 0;
5661

57-
img {
58-
vertical-align: middle;
59-
height: 40px;
60-
width: auto;
61-
}
62+
img {
63+
height: 40px;
64+
width: auto;
65+
}
6266

63-
@media screen and (max-width: $mobileWidth) {
64-
margin-left: 20px;
65-
img {
66-
height: 20px;
67-
}
67+
@media screen and (max-width: $mobileWidth) {
68+
margin-left: 20px;
69+
img {
70+
height: 20px;
6871
}
6972
}
7073
}
74+
7175
}
7276
}

base/src/main/resources/web/lib/components/header/code-quarkus-header.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import defaultQuarkusLogo from '../media/quarkus-logo.svg';
77
export interface CodeQuarkusHeaderProps {
88
streamProps: StreamPickerProps;
99
quarkusLogo?: string;
10+
brand?: JSX.Element;
1011
}
1112

1213
export interface CompanyHeaderProps extends CodeQuarkusHeaderProps {
@@ -19,13 +20,17 @@ export function CompanyHeader(props: CompanyHeaderProps) {
1920
return (
2021
<div className="header">
2122
<div className="header-content responsive-container">
22-
<div className="quarkus-brand">
23-
<a href="/" onClick={linkTracker}>
24-
<img src={props.quarkusLogo || `${defaultQuarkusLogo}`} className="project-logo" title="Quarkus" alt="Quarkus"/>
25-
</a>
23+
<div className="nav-left">
24+
<div className="brand">
25+
{props.brand || (
26+
<a href="/" onClick={linkTracker} className="quarkus-brand">
27+
<img src={props.quarkusLogo || `${defaultQuarkusLogo}`} className="project-logo" title="Quarkus" alt="Quarkus"/>
28+
</a>
29+
)}
30+
</div>
2631
<StreamPicker {...props.streamProps} />
2732
</div>
28-
<div className="nav-container">
33+
<div className="nav-right">
2934
{props.children}
3035
</div>
3136
</div>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<skipITs>true</skipITs>
2323
<surefire-plugin.version>3.5.4</surefire-plugin.version>
24-
<quarkus-web-bundler.version>1.9.1</quarkus-web-bundler.version>
24+
<quarkus-web-bundler.version>1.9.3</quarkus-web-bundler.version>
2525
<quarkus-playwright.version>2.1.3</quarkus-playwright.version>
2626

2727
<formatter.plugin.version>2.29.0</formatter.plugin.version>

0 commit comments

Comments
 (0)