Bootstrap 5: progress label may be a field

Created on 1 February 2023, over 1 year ago
Updated 8 February 2023, over 1 year ago

Problem/Motivation

Progress label is currently a setting:

 settings:
    label:
      type: "textfield"
      label: "Label"
      description: "Text shown inside the progress bar."
      preview: "Label"
      allow_token: true

Source: https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/templ...

However, the div element allows markup as content, and it looks good when the markup doesn't have margin (for ex: em, strong, a...)

So, it may also be a field. Fields (slots) are more versatile than settings (props), so such a change is a relevant.

Proposed resolution

  fields:
    label:
      type: "text"
      label: "Label"
      description: "Text shown inside the progress bar."
      preview: "Label"

As already done fro BS4: https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/4.0.x/templ...

API changes

Careful, it is breaking change. It is OK because the theme is still in alpha, but some projects may be already using it.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024