discourse/app/assets/stylesheets/common
Joffrey JAFFEUX f6a4de4805
DEV: adds support for nested collections and objects (#30265)
Collections were an existing concept in FormKit but didn't allow nesting. You can now do infinite nesting:

```gjs
<Form
  @data={{hash
    foo=(array
      (hash bar=(array (hash baz=1))) (hash bar=(array (hash baz=2)))
    )
  }}
  as |form|
>
  <form.Collection @name="foo" as |parent parentIndex|>
    <parent.Collection @name="bar" as |child childIndex|>
      <child.Field @name="baz" @title="Baz" as |field|>
        <field.Input />
      </child.Field>
    </parent.Collection>
  </form.Collection>
</Form>
```

On top of this a new component has been added: `Object`. It allows you to represent objects in your form data. Collections are basically handling arrays, and Objects are objects.

This is useful if you form data has this shape for example:

```javascript
{ foo: { bar: 1, baz: 2 } }
```

This can now be mapped in your form using this syntax:

```gjs
<Form @data={{hash foo=(hash bar=1 baz=2)}} as |form|>
  <form.Object @name="foo" as |object name|>
    <object.Field @name={{name}} @title={{name}} as |field|>
      <field.Input />
    </object.Field>
  </form.Object>
</Form>
```

Objects accept nested collections and nested objects. Just like Collections.

A small addition has also been made to `Collection`, they now support a custom `@tagName`, it's useful if each item of your collection is the row of a table for example.
2024-12-13 15:43:32 +01:00
..
admin FIX: Background color for settings overriden filter (#30221) 2024-12-12 10:27:37 +11:00
base UX: increase button sizes and timeline size (#30240) 2024-12-12 16:09:44 +01:00
components DEV: <DSelect /> (#30224) 2024-12-13 10:40:06 +01:00
float-kit UX: DMenu list buttons default styling (#29250) 2024-10-21 05:05:38 +02:00
form-kit DEV: adds support for nested collections and objects (#30265) 2024-12-13 15:43:32 +01:00
foundation UX: Make radio buttons respect forum's accent color (#30235) 2024-12-11 15:22:00 -08:00
login UX: Add progress bar to the registration flow (#27694) 2024-08-28 08:43:39 -03:00
modal FEATURE: Allow to customize the signup form descriptions (#29959) 2024-11-27 14:23:14 -03:00
select-kit DEV: remap all core icons for fontawesome 6 upgrade (#28715) 2024-09-13 16:50:52 +01:00
table-builder DEV: removes legacy modal code (#28047) 2024-07-24 18:07:17 +02:00
d-editor.scss DEV: remap all core icons for fontawesome 6 upgrade (#28715) 2024-09-13 16:50:52 +01:00
font-variables.scss UX: ensure ios font size is always min 16px with max() fn (#29270) 2024-10-18 05:26:12 +02:00
input_tip.scss UX: Hide the error tooltip when focusing the topic title (#27531) 2024-06-19 11:55:29 -03:00
loading-slider.scss
post-action-feedback.scss
printer-friendly.scss DEV: Improve method of presenting link clicks (#29453) 2024-10-31 12:44:08 -07:00
software-update-prompt.scss UX: adjust software update banner for headerless pages (#28496) 2024-08-22 16:51:26 -04:00
topic-entrance.scss DEV: Implement glimmer topic-list (#26743) 2024-05-21 14:36:15 +02:00
topic-timeline.scss Cleanup mobile topic footer area (#30132) 2024-12-11 14:59:37 +01:00
whcm.scss