Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last Bullet List Item Not Displayed on iOS Devices #1490

Open
shuvaevv opened this issue Apr 18, 2024 · 1 comment
Open

Last Bullet List Item Not Displayed on iOS Devices #1490

shuvaevv opened this issue Apr 18, 2024 · 1 comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented question M-T: User needs support to use the project server-side-issue Version: 3x web-client

Comments

@shuvaevv
Copy link

shuvaevv commented Apr 18, 2024

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.

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented question M-T: User needs support to use the project web-client Version: 3x server-side-issue and removed untriaged labels Apr 18, 2024
@seratch
Copy link
Member

seratch commented Apr 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented question M-T: User needs support to use the project server-side-issue Version: 3x web-client
Projects
None yet
Development

No branches or pull requests

2 participants