[1.1.x] Convert ID string props to identifier props

Created on 1 November 2024, about 2 months ago

Problem/Motivation

In UI Patterns 1.x, machine_name setting type was overlooked because:

  • it was added late (mid 2023)
  • it was not compatible with token source

In UI Patterns 2.x, its successor, identifier prop type can be used without those limitation.

Proposed resolution

 $ grep -r -A 3 _id components/*/*.component.yml

components/accordion/accordion.component.yml:    accordion_id:
components/accordion/accordion.component.yml-      title: ID
components/accordion/accordion.component.yml-      description: 'Must start with a letter. Randomly generated if empty.'
components/accordion/accordion.component.yml-      type: string
--
components/breadcrumb/breadcrumb.component.yml:    breadcrumb_id:
components/breadcrumb/breadcrumb.component.yml-      title: ID
components/breadcrumb/breadcrumb.component.yml-      description: 'Must start with a letter. Randomly generated if empty.'
components/breadcrumb/breadcrumb.component.yml-      type: string
--
components/button/button.component.yml:    button_id:
components/button/button.component.yml-      title: ID
components/button/button.component.yml-      description: 'Used by the tooltip. Must start with a letter. Randomly generated if empty.'
components/button/button.component.yml-      type: string
--
components/header/header.component.yml:    header_id:
components/header/header.component.yml-      title: 'Header ID'
components/header/header.component.yml-      description: 'To generate unique id attributes if several headers are in the same page. Default is randomly generated.'
components/header/header.component.yml-      type: string
--
components/link/link.component.yml:    link_id:
components/link/link.component.yml-      title: 'Link ID'
components/link/link.component.yml-      description: 'Used by the tooltip. Must start with a letter. Randomly generated if empty.'
components/link/link.component.yml-      type: string
--
components/modal/modal.component.yml:    modal_id:
components/modal/modal.component.yml-      title: 'Modal ID'
components/modal/modal.component.yml-      description: "To link the triggered element (the one with 'aria-controls') and the modal."
components/modal/modal.component.yml-      type: string
--
components/nav_menu/nav_menu.component.yml:    html_id:
components/nav_menu/nav_menu.component.yml-      title: ID
components/nav_menu/nav_menu.component.yml-      description: 'Must start with a letter. Randomly generated if empty.'
components/nav_menu/nav_menu.component.yml-      type: string
--
components/side_menu/side_menu.component.yml:    html_id:
components/side_menu/side_menu.component.yml-      title: ID
components/side_menu/side_menu.component.yml-      description: 'Used for collapse mechanism. Must start with a letter. Randomly generated if empty.'
components/side_menu/side_menu.component.yml-      type: string
components/side_menu/side_menu.component.yml:    title_id:
components/side_menu/side_menu.component.yml-      title: 'Title  ID'
components/side_menu/side_menu.component.yml-      description: 'An identifier for the side menu title. It must start with a letter and will be randomly generated if left empty.'
components/side_menu/side_menu.component.yml-      type: string
--
components/summary/summary.component.yml:    title_id:
components/summary/summary.component.yml-      title: 'Title ID'
components/summary/summary.component.yml-      description: 'Must start with a letter. Randomly generated if empty.'
components/summary/summary.component.yml-      type: string
--
components/tab_panel/tab_panel.component.yml:    unique_id:
components/tab_panel/tab_panel.component.yml-      title: 'Unique ID'
components/tab_panel/tab_panel.component.yml-      description: 'Must be unique in the scope of a Web page. The same ID will be passed to the corresponding tab.'
components/tab_panel/tab_panel.component.yml-      type: string
--
components/tab/tab.component.yml:    unique_id:
components/tab/tab.component.yml-      title: 'Unique ID'
components/tab/tab.component.yml-      description: 'Must be unique in the scope of a Web page. The same ID will be passed to the corresponding panel.'
components/tab/tab.component.yml-      type: string
--
components/transcription/transcription.component.yml:    transcription_id:
components/transcription/transcription.component.yml-      title: 'Transcription ID'
components/transcription/transcription.component.yml-      description: 'To generate unique id attributes if several transcriptions are in the same page. Default is randomly generated.'
components/transcription/transcription.component.yml-      type: string
--
components/translate/translate.component.yml:    translate_id:
components/translate/translate.component.yml-      title: ID
components/translate/translate.component.yml-      description: 'Used for collapse mechanism. Must start with a letter. Randomly generated if empty.'
components/translate/translate.component.yml-      type: string
📌 Task
Status

Active

Version

1.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.71.5 2024