Skip to content

Conversation

@kchobantonov
Copy link
Contributor

@kchobantonov kchobantonov commented Jan 19, 2026

  1. The vertical, horizontal renderers were adding unwanted padding and spacing even when child elements were hidden or not rendered. This caused layout issues with:
  • Empty spaces appearing when controls had visible: false
  • Excessive padding accumulating in deeply nested layouts
  • Inconsistent spacing between visible elements
  1. Make the group layout and array layouts/control to use collapsable panels to make it easy to deal with array with large number of elements if we want to collapse the whole array UI into just one row.

  2. Make the space usage similar to react - e.g. remove exta margins and/or paddings

  3. Other minor fixes

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 9eabb1b
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/6973a7eeb211cf000891cf94
😎 Deploy Preview https://deploy-preview-2533--jsonforms-examples.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.

@kchobantonov
Copy link
Contributor Author

@sdirix @lucas-koehler please review - new demo example employee-registration

@kchobantonov kchobantonov marked this pull request as draft January 20, 2026 16:55
@kchobantonov
Copy link
Contributor Author

kchobantonov commented Jan 20, 2026

found an issue with horizontal layout when we do not use padding but gap in order to fix the issue with the elements that are invisible because of the security to not have extra space but this breaks when we want to use number of columns in the UI model like

"options": {
    "vuetify": {
      "v-col": [
        {
          "cols": 8
        },
        {
          "cols": 2
        }
      ]
    }
  }

…ut can't be easily fixed with gap and allowing the v-col cols property to work
@kchobantonov
Copy link
Contributor Author

fixing the horizontal and vertical layout by using no-gutters for vertical and fluid for both horizontal and vertical layouts

@kchobantonov kchobantonov marked this pull request as ready for review January 20, 2026 22:43
@kchobantonov
Copy link
Contributor Author

fix removing extra paddings for invisible elements by not creating the v-col for such elements.

@kchobantonov
Copy link
Contributor Author

@sdirix @lucas-koehler please review - the pr is ready now

@coveralls
Copy link

Coverage Status

coverage: 82.798%. remained the same
when pulling 9eabb1b on kchobantonov:fix-layout
into d3662e2 on eclipsesource:master.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution ❤️

Again this is difficult to review. This PR has 6+ different concerns wrapped into one pull request. Separate small PRs would make reviewing easier and would reduce the wait time for you to get feedback.

This PR addresses:

  • Layout visibility filtering (main goal?)
  • Converting v-card to v-expansion-panels
  • Spacing/padding cleanups
  • Unrelated control fixes
  • Dev changes
  • Unrelated Vue package changes, not directly tied to Vue-Vuetify

There are so many functionality and layout changes that it makes it really hard to test all of them besides a shallow "looks fine to me".

Please split them in the future.


Functionality wise most changes look fine.

The v-expansion-panels refactoring is an obvious breaking change for all adopters using them, in behavior as well as in configuration (e.g. when they used 'v-card' props to customize them). So this should be mentioned in the Breaking Changes / Migration guide. Again this would be easier as a separate PR.

Overall I don't have confidence for all the layout changes, I might have overlooked something.

Please have a look at the comments.

},
},
methods: {
isVisible(uischema: UISchemaElement, path: string): boolean {
Copy link
Member

Choose a reason for hiding this comment

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

This isVisible method is copy-pasted across 3 files: HorizontalLayoutRenderer, VerticalLayoutRenderer, GroupRenderer. Maybe this should be a shareable composition? Maybe the same for visibleElementsWithIndex? This wouild also allow to unify the behavior between Horizontal and Vertical rendering as they implement this logic differently now.

@@ -1,5 +1,5 @@
<template>
<div>No applicable renderer found.</div>
<div :style="{ color: 'red' }">No applicable renderer found.</div>
Copy link
Member

Choose a reason for hiding this comment

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

We usually avoid hard coded styling in the non-renderer and Vanilla packages. This should get a proper class so it can be styled as required by adopters.

I know we do it in React too but this is more of an old historical oversight.

I would prefer using a class over inline styling.

Copy link
Member

Choose a reason for hiding this comment

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

This change is unnecessary

>
<v-col
cols="12"
v-if="isVisible(element, layout.path)"
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this v-if we could already iterate over the filtered list like in the other renderers

return { ...useVuetifyLayout(useJsonFormsLayout(props)), jsonforms };
},
methods: {
// helper method to check visibility and if not visible to remove the v-col since otherwise it will add extra padding
Copy link
Member

Choose a reason for hiding this comment

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

Not sure the comment is needed here

<v-expansion-panel-title
:class="styles.group.label"
v-bind="vuetifyProps('v-expansion-panel-title')"
>{{ layout.label }}</v-expansion-panel-title
Copy link
Member

Choose a reason for hiding this comment

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

Now that Groups are clickable it's a bit weird that the label can be empty. However I also don't have a good suggestion for this case. Maybe add an icon if the label is empty? Or revert to the old v-card grouping? Not sure. See the rule example to check how this looks like in the UI.

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.

3 participants