Skip to content

v0.22.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 10:38
48a5bd0
  • @lowdefy/modules-mongodb-plugins: ### Minor Changes

  • #138 254289d Thanks @Saiby100! - Five selectors in the form-components library — selector, multiple_selector, button_selector, radio_selector, checkbox_selector — now take an enum var as an alternative to options. An enum map (slug → { title, color, icon }) is converted to options for you: the title becomes the label, the slug is the stored value, the colour tints the selected value and the icon shows on a multiple_selector tag. options wins when both are set, and an operator-valued enum (_global: enums.x, _module.var: y) still resolves. tree_multiple_selector stays options-only: a flat enum map cannot express the primaryKey/parentKey hierarchy it exists for, and for flat choices multiple_selector renders enum colours and icons that the tree drops.

    On read-only surfaces, an enum-driven selector now shows the entry's title. The DataDescriptions block reads the field's enum map off the form config and renders the matching entry's title, colour and icon instead of formatting the stored slug — so a status of in-progress with title "In progress" no longer displays as "In Progress". Overview action cards carry the enum map through, so they resolve too. Nothing else changes: an options-driven selector, an unknown value, and a field with no enum all keep their existing display.

    Breaking: the enum_selector component is removed — it was a Selector-only special case of what selector + enum now does. Replace component: enum_selector with component: selector and keep the same enum: map. Two behaviour differences to expect: the label is no longer hardcoded to align: right / span: 12 (declare label_inline / label_span if you relied on it), and the enum's colour now actually tints the selected value, which the old component's option shape never did.

Patch Changes

  • #138 b8f7213 Thanks @Saiby100! - A checkbox_selector field now uses the selector renderer on read-only surfaces, like every other selector. It was the one options-taking selector missing from the DataDescriptions component hints, so its stored slugs fell through to the generic string renderer. That path already rendered them as tags, so the visible fix is enum resolution: an enum-backed checkbox list showed "Weekly" (the slug, title-cased) instead of the entry's title "Weekly review", and dropped the entry's colour and icon.

  • @lowdefy/modules-mongodb-workflows: ### Minor Changes

  • #138 254289d Thanks @Saiby100! - Five selectors in the form-components library — selector, multiple_selector, button_selector, radio_selector, checkbox_selector — now take an enum var as an alternative to options. An enum map (slug → { title, color, icon }) is converted to options for you: the title becomes the label, the slug is the stored value, the colour tints the selected value and the icon shows on a multiple_selector tag. options wins when both are set, and an operator-valued enum (_global: enums.x, _module.var: y) still resolves. tree_multiple_selector stays options-only: a flat enum map cannot express the primaryKey/parentKey hierarchy it exists for, and for flat choices multiple_selector renders enum colours and icons that the tree drops.

    On read-only surfaces, an enum-driven selector now shows the entry's title. The DataDescriptions block reads the field's enum map off the form config and renders the matching entry's title, colour and icon instead of formatting the stored slug — so a status of in-progress with title "In progress" no longer displays as "In Progress". Overview action cards carry the enum map through, so they resolve too. Nothing else changes: an options-driven selector, an unknown value, and a field with no enum all keep their existing display.

    Breaking: the enum_selector component is removed — it was a Selector-only special case of what selector + enum now does. Replace component: enum_selector with component: selector and keep the same enum: map. Two behaviour differences to expect: the label is no longer hardcoded to align: right / span: 12 (declare label_inline / label_span if you relied on it), and the enum's colour now actually tints the selected value, which the old component's option shape never did.