slackapi / node-slack-sdk

Slack Developer Kit for Node.js
https://slack.dev/node-slack-sdk
MIT License
3.26k stars 656 forks source link

Document inconsistency: checkboxes block element's description can have both plain_text and mrkdwn #1765

Closed StephenTangCook closed 3 months ago

StephenTangCook commented 3 months ago

There appears to be undocumented support for option description as type markdown, specifically for checkboxes. The Block Builder default data for Section > checkboxes gives the following:

"options": [
  {
  "text": {
      "type": "mrkdwn",
      "text": "*this is mrkdwn text*"
  },
  "description": {
      "type": "mrkdwn",
      "text": "*this is mrkdwn text*"
  },
  "value": "value-0"
  }
]

This exception is missing from the API docs on options.

List any relevant URLs

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

filmaj commented 3 months ago

I followed up on this and this seems to apply to both checkboxes and radio buttons.

Until we get this fixed up on our docs, the correct way to interpret what kinds of texts apply to the description field is to re-use the rules laid out in the text field. That is, a plain_text object must be used for the description field for select, multi-select and overflow menus, while either plain_text or mrkdwn can be used for the field for radio and check boxes.

filmaj commented 3 months ago

The doc updates for this are on their way to production! Closing this, and thanks for reporting 🙇