Problem/Motivation

Regarding #3319153: Bootstrap 4: roadmap to first beta:

Move props from ui_patterns field to ui_settings: button.url, badge.url, media.image_url , breadcrumb.items, navbar.items

It may also be the moment to do that for Bootstrap 5 too.

Proposed resolution

Here are the current patterns where there are some "text" fields:

  • accordion_item
  • alert
  • button
  • button_group
  • button_toolbar
  • card_body
  • dropdown
  • list_group_item
  • navbar

Analysis:

accordion_item:
- title: printed inside <button> => ok
alert:
- heading: printed inside <h4> => ok
button:
- label: printed inside <a> or <button> => ok
- url: used in href attribute => to rework
button_group:
- label: used inside aria-label attribute => to rework
button_toolbar:
- label: used inside aria-label attribute => to rework
card_body:
- title: printed inside <h*> => ok
- subtitle: printed inside <h*> => ok
- text: printed inside <p> => ok
dropdown:
- title: used as label field of the button pattern => ok
list_group_item:
- url: used in href attribute => to rework
navbar:
- offcanvas_label: printed inside <h5> => ok

So fields to rework:
- button.url
- button_group.label
- button_toolbar.label
- list_group_item.url

API changes

Full compatibility breaks if a website already use those patterns.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: pdureau » grimreaper

Discussed together. A text in field is not necessarily to be converted in settings.

grimreaper’s picture

Issue summary: View changes

Analysis:

accordion_item:
- title: printed inside <button> => ok
alert:
- heading: printed inside <h4> => ok
button:
- label: printed inside <a> or <button> => ok
- url: used in href attribute => to rework
button_group:
- label: used inside aria-label attribute => to rework
button_toolbar:
- label: used inside aria-label attribute => to rework
card_body:
- title: printed inside <h*> => ok
- subtitle: printed inside <h*> => ok
- text: printed inside <p> => ok
dropdown:
- title: used as label field of the button pattern => ok
list_group_item:
- url: used in href attribute => to rework
navbar:
- offcanvas_label: printed inside <h5> => ok

So fields to rework:
- button.url
- button_group.label
- button_toolbar.label
- list_group_item.url

grimreaper’s picture

Issue summary: View changes

Fix issue summary markup

grimreaper’s picture

Status: Active » Needs review

  • Grimreaper committed 5d198bed on 5.0.x
    Issue #3328657 by Grimreaper, pdureau: Bootstrap 5: props/slots...
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.