Skip to content

Commit 29cbd9f

Browse files
committed
show bundle in extension catalog and ui
Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
1 parent e4320be commit 29cbd9f

9 files changed

Lines changed: 41 additions & 7 deletions

File tree

ui/compiled/bundle.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/css/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,16 @@ a.ext-row-name:hover {
10361036
text-underline-offset: 2px;
10371037
}
10381038

1039+
.ext-row-bundle {
1040+
font-size: 11px;
1041+
color: var(--text-light);
1042+
font-family: var(--font-mono);
1043+
margin-top: 1px;
1044+
white-space: nowrap;
1045+
overflow: hidden;
1046+
text-overflow: ellipsis;
1047+
}
1048+
10391049
.ext-row-desc {
10401050
font-size: 12px;
10411051
color: var(--text-muted);

ui/src/components/ExtensionRow.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@
283283
{:else}
284284
<span class="ext-row-name">{displayLabel}</span>
285285
{/if}
286+
{#if ext.parent}
287+
<div class="ext-row-bundle">bundle: {ext.parent}</div>
288+
{/if}
286289
<div class="ext-row-desc">{ext.description}</div>
287290
</div>
288291

website/src/components/ExtensionCard.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ interface Props {
55
categories: string[];
66
description: string;
77
href: string;
8+
parent?: string;
89
tags?: string[];
910
filterTypes?: string[];
1011
}
1112
12-
const { name, type, categories, description, href, tags = [], filterTypes = [] } = Astro.props;
13+
const { name, type, categories, description, href, parent, tags = [], filterTypes = [] } = Astro.props;
1314
const sortedCategories = [...categories].sort((a, b) => a.localeCompare(b));
1415
const sortedTags = [...tags].sort((a, b) => a.localeCompare(b));
1516
---
1617

1718
<a href={href} class="extension-card-link">
1819
<div class="extension-card" data-type={type} data-tags={tags.join(',')} data-filter-types={filterTypes.join(',')}>
1920
<div class="extension-header">
20-
<h3>{name}</h3>
21+
<div class="extension-title">
22+
<h3>{name}</h3>
23+
{parent && <span class="extension-parent">bundle: {parent}</span>}
24+
</div>
2125
<div class="extension-badges">
2226
{sortedCategories.map(category => (
2327
<span class={`extension-badge extension-badge--${category.toLowerCase().replace(/\s+/g, '-')}`}>{category}</span>

website/src/components/Extensions.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const featuredExtensions = loadExtensions().filter(ext => ext.featured === true)
1818
categories={ext.categories}
1919
description={ext.description}
2020
href={`/extensions/${ext.name}`}
21+
parent={ext.parent}
2122
tags={ext.tags}
2223
filterTypes={ext.filterType}
2324
/>

website/src/pages/extensions.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function formatTypeName(type: string): string {
9898
categories={ext.categories}
9999
description={ext.description}
100100
href={`/extensions/${ext.name}`}
101+
parent={ext.parent}
101102
tags={ext.tags}
102103
filterTypes={ext.filterType}
103104
/>

website/src/pages/extensions/[name].astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ function formatTypeName(type: string): string {
8989
<span class="meta-label">Version</span>
9090
<span class="meta-value">{extension.version}</span>
9191
</div>
92+
{extension.parent && (
93+
<div class="meta-item">
94+
<span class="meta-label">Bundle</span>
95+
<span class="meta-value">{extension.parent}</span>
96+
</div>
97+
)}
9298
{(extension.minEnvoyVersion || extension.maxEnvoyVersion) && (
9399
<div class="meta-item">
94100
<span class="meta-label">Envoy Version</span>

website/src/styles/main.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,14 @@ header nav a:focus {
589589
font-family: 'Monaco', 'Menlo', monospace;
590590
}
591591

592+
.extension-parent {
593+
display: block;
594+
font-size: 12px;
595+
color: var(--text-light);
596+
font-family: 'Monaco', 'Menlo', monospace;
597+
margin-top: 2px;
598+
}
599+
592600
.extension-badges {
593601
display: flex;
594602
gap: 4px;

website/src/utils/extensions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface Extension {
1919
longDescription: string;
2020
tags: string[];
2121
license: string;
22+
parent?: string;
2223
featured?: boolean;
2324
composerVersion?: string;
2425
minEnvoyVersion?: string;

0 commit comments

Comments
 (0)