Skip to content

Comments

chore(x/x-layout): use XLayout::variant everywhere remove XLayout::type#4631

Open
johncowen wants to merge 5 commits intokumahq:masterfrom
johncowen:chore/xlayout-variant-upgrade
Open

chore(x/x-layout): use XLayout::variant everywhere remove XLayout::type#4631
johncowen wants to merge 5 commits intokumahq:masterfrom
johncowen:chore/xlayout-variant-upgrade

Conversation

@johncowen
Copy link
Contributor

AI refactor (OpenCode/Copilot's Sonnet 4.5) to move XLayout to use variant everywhere instead of type.

Temporarily included my prompt/plan, will probably delete that before merge/approval

This PR is also a part experiment/bounce-around of AI. (also see #4623)

Signed-off-by: John Cowen <john.cowen@konghq.com>
Assisted-by: OpenCode (Claude Sonnet 4.5)
@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit dd1e713
🔍 Latest deploy log https://app.netlify.com/projects/kuma-gui/deploys/699860cbd59e280008698f7a
😎 Deploy Preview https://deploy-preview-4631--kuma-gui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: John Cowen <john.cowen@konghq.com>
|------------------|---------------------|-------|
| `"stack"` | `"y-stack"` | Vertical stack (renamed for clarity) |
| `"separated"` | `"separated"` | Direct mapping (no change) |
| `"columns"` | `"columns"` | Direct mapping (no change, not currently used) |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this not currently used is the reason why it didn't upgrade the places where we use type="columns" then its a lie 😆 I added a commit doing the upgrade for columns

Signed-off-by: John Cowen <john.cowen@konghq.com>
@johncowen johncowen marked this pull request as ready for review February 19, 2026 18:43
@johncowen johncowen requested a review from a team as a code owner February 19, 2026 18:43
@johncowen johncowen requested a review from bartsmykla February 19, 2026 18:43
Signed-off-by: John Cowen <john.cowen@konghq.com>
</template>

<XLayout
variant="y-stack"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this here as we no longer have a default/empty variant, pretty sure this is fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason to not have a default variant? Personally I think it's good to not have a default because it's more explicit and easier to follow when reading through the templates how the UI will look like in the end without constantly needing to remember what the default is. Just curious if you had something else in mind 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly the same reason 🙌 , tbh I'm torn between ease of use and this reasoning you've given here, but as this is a visual thing its nice to have that visual cue in the code.

Signed-off-by: John Cowen <john.cowen@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants