Visitar URL original
Last Bullet List Item Not Displayed on iOS Devices · Issue #1490 · slackapi/python-slack-sdk · GitHub
Skip to content

Last Bullet List Item Not Displayed on iOS Devices #1490

Description

@shuvaevv

On iOS devices, the last line of the bullet list is not showing up when the message is sent using blocks.
This issue doesn't occur on desktop or Android devices where it displays as expected.
(See screenshots and code provided below.)

Reproducible in:

The Slack SDK version

slack_sdk==3.27.1

Python runtime version

Python 3.11.7

OS info

Darwin Kernel Version 23.3.0: Wed Dec 20 21:28:58 PST 2023; root:xnu-10002.81.5~7/RELEASE_X86_64

Steps to reproduce:

import os
from slack_sdk import WebClient

channel = os.environ["SLACK_CHANNEL"]
slack_token = os.environ["SLACK_BOT_TOKEN"]

client = WebClient(token=slack_token)

blocks = [
    {'type': 'section', 'text': {'type': 'mrkdwn', 'text': 'Bullet list:'}}, 
    {'type': 'section', 'text': {'type': 'mrkdwn', 'text': '• `john.doe@example.com`\n• `john.smith@example.com`'}}
]

client.chat_postMessage(
    channel=channel, blocks=blocks
)

Expected result:

image

Actual result:

photo1713403039

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

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

Activity

  1. added
    bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
    questionM-T: User needs support to use the project
    and removed on Apr 18, 2024
  2. seratch commented on Apr 18, 2024

    @seratch
    Contributor

    Hi @shuvaevv, thanks for sharing this, and we apologize for the inconvenience the iOS app has caused you.

    Indeed, it does seem to be a bug on the iOS client app side, and it certainly needs to be resolved in its future releases. However, I am unable to tell when the fix will be delivered to you.

    Therefore, as a workaround for this issue, I would suggest utilizing rich text blocks instead. Representing the list of items using the rich text blocks should work more reliably with any of the client apps.

    blocks = [
        {
            "type": "rich_text",
            "elements": [
                {
                    "type": "rich_text_section",
                    "elements": [{"type": "text", "text": "Bullet list:"}],
                },
                {
                    "type": "rich_text_list",
                    "style": "bullet",
                    "elements": [
                        {
                            "type": "rich_text_section",
                            "elements": [
                                {
                                    "type": "text",
                                    "text": "john.doe@example.com",
                                    "style": {"code": True},
                                }
                            ],
                        },
                        {
                            "type": "rich_text_section",
                            "elements": [
                                {
                                    "type": "text",
                                    "text": "john.smith@example.com",
                                    "style": {"code": True},
                                }
                            ],
                        },
                    ],
                },
            ],
        },
    ]

    I do realize this may require code changes on your side, but I hope you find this is helpful for the time being.

  3. github-actions commented on Jun 3, 2024

    @github-actions

    👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Version: 3xauto-triage-skipbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedquestionM-T: User needs support to use the projectserver-side-issueweb-client

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions