oracle / oraclejet

Oracle JET is a modular JavaScript Extension Toolkit for developers working on client-side applications.
https://oracle.com/jet
Other
504 stars 115 forks source link

user-assistance-density default value needs to be explicitly set for nested oj-form-layout components #64

Open pentzzsolt opened 4 years ago

pentzzsolt commented 4 years ago

Using JET 9.0.0, Redwood theme, given the following markup:

<oj-form-layout class="oj-formlayout-full-width">
  <oj-input-number label-hint="test" required="true"></oj-input-number>
  <oj-input-number label-hint="test2" required="true"></oj-input-number>
  <oj-form-layout class="oj-formlayout-full-width" max-columns="2">
    <oj-select-single label-hint="test3" required="true"></oj-select-single>
    <oj-select-single label-hint="test4" required="true"></oj-select-single>
  </oj-form-layout>
  <oj-input-date-time label-hint="test5" required="true"></oj-input-date-time>
</oj-form-layout>

After filling out the fields in the nested <oj-form-layout> component, the spacing between those fields and the one under them collapses. Explicitly setting user-assistance-density to the default value efficient on either the outer or the inner <oj-form-layout> component fixes this issue.

jeannew commented 4 years ago

Hi, this sounds like a bug. user-assistance-density attribute is new in v9.0.

user-assistance-density defaults to 'efficient' when it is inside an oj-form-layout, and 'reflow' when not inside of an oj-form-layout. It sounds like something is happening with oj-select-single when you fill it out that causes the user-assistance-density to default back to 'reflow'. Perhaps it is refreshing itself and that blows away the way the property binding defaulting mechanism. I'll take a look. It sounds easily reproducible. Thanks for reporting it.

Jeanne

jeannew commented 4 years ago

I took a look at it and it is an easy-to-fix bug with nesting oj-form-layout and the propagation of the user-assistance-density.