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 · 2 comments
Open

Last Bullet List Item Not Displayed on iOS Devices #1490

shuvaevv opened this issue Apr 18, 2024 · 2 comments
Labels
auto-triage-skip 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': '• `[email protected]`\n• `[email protected]`'}}
]

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": "[email protected]",
                                "style": {"code": True},
                            }
                        ],
                    },
                    {
                        "type": "rich_text_section",
                        "elements": [
                            {
                                "type": "text",
                                "text": "[email protected]",
                                "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.

Copy link

github-actions bot commented Jun 3, 2024

👋 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
Labels
auto-triage-skip 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

3 participants