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

[Notifier][Slack] Add fields on Slack Section block #36154

Merged
merged 1 commit into from Mar 23, 2020

Conversation

@birkof
Copy link
Contributor

birkof commented Mar 21, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR

Added fields field on section block.

An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the text in each item is 2000 characters.

Example of use:

$slackOptions = (new SlackOptions())
            ->block((new SlackSectionBlock())->text('My message'))
            ->block(new SlackDividerBlock())
            ->block(
                (new SlackSectionBlock())
                    ->field('*Max Rating*')
                    ->field('5.0')
                    ->field('*Min Rating*')
                    ->field('1.0')
            );

Expected output:

Screen Shot 2020-03-21 at 09 57 36

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 23, 2020
@fabpot
fabpot approved these changes Mar 23, 2020
@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 23, 2020

Thank you @birkof.

@fabpot fabpot merged commit 0076ed5 into symfony:master Mar 23, 2020
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details
@birkof birkof deleted the birkof:slack-fields-section-block branch Apr 4, 2020
@birkof

This comment has been minimized.

Copy link
Contributor Author

birkof commented Apr 4, 2020

@fabpot due some limitations on these fields, I have added one minor fix: #36347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.