slackapi / bolt-python

A framework to build Slack apps using Python
https://tools.slack.dev/bolt-python/
MIT License
1.07k stars 246 forks source link

Reduce Spacing between two blocks #422

Closed Cyb-Nikh closed 3 years ago

Cyb-Nikh commented 3 years ago

Is there a way to reduce spacing between the section type and context type

Our Requirements: Text1 which is followed by text2, text 2 has to be in smaller font size as compare to text1 (that's why we are using type: "context" here). But while doing so there seems to be a good difference between the two blocks which we don't want. Is it possible to reduce it?

Below mentioned is the payload for reference.

{
    "blocks": [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "*We want to hear from you, how was it? how can we improve ?*"
            }
        },
        {
            "type": "context",
            "elements": [
                {
                    "type": "plain_text",
                    "text": "*No need to sugar-coat it, we value your authentic thoughts ",
                    "emoji": true
                }
            ]
        },
        {
            "dispatch_action": true,
            "type": "input",
            "element": {
                "type": "plain_text_input",
                "multiline": true,
                "action_id": "plain_text_input-action"
            },
            "label": {
                "type": "plain_text",
                "text": "\n",
                "emoji": true
            }
        }
    ]
}
stevengill commented 3 years ago

Hey @Cyb-Nikh

Unfortunately, there is no way to change the built in styling for block kit. You can try using different element types to see if you can get a desired result, but the default styling is unchangeable.

seratch commented 3 years ago

Hi @Cyb-Nikh, as Steve provided an answer to this and we don't have anything further to share so far, let us close this issue now. If you have anything further to ask/discuss regarding this topic, please feel free to write in at any time!