Skip to content

Commit a3be08d

Browse files
authored
chore: XDS Configurations > XDS Connections (#3514)
Changes the text of `XDS Configurations` titles to say `XDS Connections`. This is mainly the title for some nest tables that we have, but also I removed the word `Configuration` from the Subscription Summary Drawers and just left it blank. Leaving it blank meant I needed a new right alignment `XLayout` so I following flexbox I added `start`, `around`, `between` and `end` for our `separated` layout, and also (importantly) made all `separated` layouts take up 100% of their parents width (similar to a native div). Closes #3452 Signed-off-by: John Cowen <[email protected]>
1 parent a596791 commit a3be08d

File tree

6 files changed

+44
-41
lines changed

6 files changed

+44
-41
lines changed

packages/kuma-gui/src/app/data-planes/locales/en-us/index.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ data-planes:
9696
disabled: !!text/markdown |
9797
This Data Plane Proxy does not have mTLS configured, yet — <a href="{KUMA_DOCS_URL}/policies/mutual-tls?{KUMA_UTM_QUERY_PARAMS}">Learn about certificates in {KUMA_PRODUCT_NAME}</a>
9898
subscriptions:
99-
title: XDS Configurations
99+
title: XDS Connections
100100
rules:
101101
proxy: Proxy rule
102102
to: To rules

packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryView.vue

+18-21
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,29 @@
2424
</h2>
2525
</template>
2626

27-
<XLayout type="stack">
27+
<XLayout
28+
type="stack"
29+
>
2830
<header>
2931
<XLayout
3032
type="separated"
31-
size="max"
33+
justify="end"
3234
>
33-
<h3>
34-
{{ t('subscriptions.routes.item.config') }}
35-
</h3>
36-
<div>
37-
<XSelect
38-
:label="t('subscriptions.routes.item.format')"
39-
:selected="route.params.format"
40-
@change="(value) => {
41-
route.update({ format: value })
42-
}"
35+
<XSelect
36+
:label="t('subscriptions.routes.item.format')"
37+
:selected="route.params.format"
38+
@change="(value) => {
39+
route.update({ format: value })
40+
}"
41+
>
42+
<template
43+
v-for="value in ['structured', 'yaml']"
44+
:key="value"
45+
#[`${value}-option`]
4346
>
44-
<template
45-
v-for="value in ['structured', 'yaml']"
46-
:key="value"
47-
#[`${value}-option`]
48-
>
49-
{{ t(`subscriptions.routes.item.formats.${value}`) }}
50-
</template>
51-
</XSelect>
52-
</div>
47+
{{ t(`subscriptions.routes.item.formats.${value}`) }}
48+
</template>
49+
</XSelect>
5350
</XLayout>
5451
</header>
5552

packages/kuma-gui/src/app/x/components/x-code-block/XCodeBlock.vue

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<template>
2-
<div>
2+
<XLayout
3+
type="stack"
4+
>
35
<template
46
v-if="slots['primary-actions']"
57
>
6-
<div
7-
class="toolbar"
8+
<XLayout
9+
type="separated"
10+
justify="end"
811
>
912
<slot name="primary-actions" />
10-
</div>
13+
</XLayout>
1114
</template>
1215
<KCodeBlock
1316
:id="id"
@@ -33,7 +36,7 @@
3336
<slot name="secondary-actions" />
3437
</template>
3538
</KCodeBlock>
36-
</div>
39+
</XLayout>
3740
</template>
3841

3942
<script lang="ts" setup>
@@ -82,13 +85,6 @@ async function handleCodeBlockRenderEvent({ preElement, codeElement, language, c
8285
</script>
8386

8487
<style lang="scss" scoped>
85-
.toolbar {
86-
display: flex;
87-
justify-content: flex-end;
88-
align-items: center;
89-
gap: $kui-space-60;
90-
margin-bottom: $kui-space-60;
91-
}
9288
// Makes code block actions sticky
9389
:deep(.code-block-actions) {
9490
position: sticky;

packages/kuma-gui/src/app/x/components/x-layout/XLayout.vue

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<component
33
:is="props.type === 'separated' && props.truncate ? KTruncate : 'div'"
4-
:class="['x-layout', props.type, props.size]"
4+
:class="['x-layout', props.type, props.size, props.justify]"
55
>
66
<slot name="default" />
77
</component>
@@ -12,10 +12,12 @@ const props = withDefaults(defineProps<{
1212
// TODO(jc) :variant
1313
type?: 'stack' | 'separated' | 'columns'
1414
size?: 'small' | 'normal' | 'max'
15+
justify?: 'start' | 'around' | 'between' | 'end'
1516
truncate?: boolean
1617
}>(), {
1718
type: 'stack',
1819
size: 'normal',
20+
justify: 'start',
1921
truncate: false,
2022
})
2123
</script>
@@ -26,18 +28,26 @@ const props = withDefaults(defineProps<{
2628
.stack.small > * + * {
2729
margin-block-start: $kui-space-40;
2830
}
29-
.max {
30-
width: 100%;
31-
}
3231
.separated:not(.k-truncate) {
3332
display: inline-flex;
3433
flex-wrap: wrap;
3534
align-items: center;
3635
gap: $kui-space-40;
36+
width: 100%;
3737
38-
&.max {
38+
&.start {
39+
justify-content: flex-start;
40+
}
41+
&.max,
42+
&.between {
3943
justify-content: space-between;
4044
}
45+
&.around {
46+
justify-content: space-around;
47+
}
48+
&.end {
49+
justify-content: flex-end;
50+
}
4151
}
4252
.columns {
4353
--threshold: 40rem;

packages/kuma-gui/src/app/zone-egresses/locales/en-us/index.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ zone-egresses:
1616
overview: 'Overview'
1717
config: 'Configuration'
1818
subscriptions:
19-
title: 'XDS connections'
19+
title: 'XDS Connections'
2020
about:
2121
title: About this Zone Egress
2222
items:

packages/kuma-gui/src/app/zone-ingresses/locales/en-us/index.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ zone-ingresses:
1717
overview: 'Overview'
1818
config: Configuration
1919
subscriptions:
20-
title: 'XDS connections'
20+
title: 'XDS Connections'
2121
about:
2222
title: About this Zone Ingress
2323
items:

0 commit comments

Comments
 (0)