Skip to content

Commit add2e03

Browse files
authored
fix(x-layout): x-stack elements dont take available space (#4998)
In `Resources` and `Policies` we have nested views that are being layed out via `XLayout` and `x-stack`. That caused that the nested views only take the space that it needed. On wide screens that meant some white space. ~I've changed the `size` attribute on these `XLayout`s to `max` and for that case let children grow. So far we've only used `size=max` in summary views for `variant=separated`, which will not conflict.~ **Before** <img width="3011" height="1332" alt="Screenshot 2026-06-09 at 12 09 50" src="https://github.com/user-attachments/assets/26b65c0b-de7b-48c5-bf51-7ef2b67a1b83" /> <img width="2996" height="1335" alt="Screenshot 2026-06-09 at 12 09 56" src="https://github.com/user-attachments/assets/fb37cc0c-ce57-4132-ba1d-359d9aaebbfb" /> **After** <img width="3012" height="1334" alt="Screenshot 2026-06-09 at 12 08 23" src="https://github.com/user-attachments/assets/aa91c3ae-9d23-4323-a7c2-8981c497b6df" /> <img width="2998" height="1335" alt="Screenshot 2026-06-09 at 12 08 07" src="https://github.com/user-attachments/assets/da03b87e-a2c9-4b79-ab07-a72ab978b13c" /> --------- Signed-off-by: schogges <moritz.fleck@konghq.com>
1 parent 97128e9 commit add2e03

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/kuma-gui/src/app/policies/views/PolicyTypeListView.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ import { sources } from '@/app/policies/sources'
121121
top: calc(var(--AppHeaderHeight) + var(--x-space-70));
122122
align-self: flex-start;
123123
max-width: 500px;
124+
125+
& + * {
126+
flex: 1;
127+
}
124128
}
125129
ul {
126130
list-style-type: none;

packages/kuma-gui/src/app/resources/views/ResourceTypeListView.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ import { sources } from '@/app/resources/sources'
178178
.resource-type-collection {
179179
max-width: 500px;
180180
align-self: flex-start;
181+
182+
& + * {
183+
flex: 1;
184+
}
181185
}
182186
183187
ul {

0 commit comments

Comments
 (0)