docs icon indicating copy to clipboard operation
docs copied to clipboard

The example YAML in the issue form schema is incorrect

Open stockholmux opened this issue 2 years ago • 3 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#about-githubs-form-schema

What part(s) of the article would you like to see updated?

In the example YAML under the section "About GitHub's form schema" is incorrect and will render JSON in the resulting form dropdown. This section:

- type: dropdown
  attributes:
    label: Version
    description: What version of our software are you running?
    multiple: false
    options:
      - label: 1.0.2 (Default)
      - label: 1.0.3 (Edge)

In attributes.options having label: before the drop down item text will result in the following rendering:

Screen Shot 2023-01-06 at 3 05 33 PM

Removing label will correct the issue:

- type: dropdown
  attributes:
    label: Version
    description: What version of our software are you running?
    multiple: false
    options:
      - 1.0.2 (Default)
      - 1.0.3 (Edge)

Yielding: Screen Shot 2023-01-06 at 3 18 04 PM

Additional information

No response

stockholmux avatar Jan 06 '23 22:01 stockholmux

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Jan 06 '23 22:01 welcome[bot]

@stockholmux Thanks so much for opening an issue! We appreciate all the info and screenshots!

I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Jan 09 '23 16:01 cmwilson21

Thanks so much for opening this issue! You or anyone else can open a PR with a fix 🔨.

sophietheking avatar Jan 27 '23 10:01 sophietheking

Closed via https://github.com/github/docs/pull/23577 💖

cmwilson21 avatar Mar 07 '23 14:03 cmwilson21