Introduce Rich Text, Markdown, and Table Blocks & new Elements#140
Open
udivankin wants to merge 5 commits intoraycharius:mainfrom
Open
Introduce Rich Text, Markdown, and Table Blocks & new Elements#140udivankin wants to merge 5 commits intoraycharius:mainfrom
udivankin wants to merge 5 commits intoraycharius:mainfrom
Conversation
Introduces support for Slack's rich text blocks and elements, including new Bits (RichTextSection, RichTextList, RichTextQuote, RichTextPreformatted, RichTextText, RichTextEmoji, RichTextLink, RichTextUser, RichTextChannel, RichTextUsergroup, RichTextBroadcast, RichTextDate, RichTextColor, RichTextTeam), Blocks (RichText, Markdown, Table, ContextActions), and Elements (WorkflowButton, IconButton, FeedbackButtons, RichTextInput). Updates documentation, constants, and tests to cover all new features and objects.
Replaces all references to api.slack.com in documentation and source code with docs.slack.dev, ensuring all links point to the new Slack API documentation domain.
Replaces outdated Slack Block Kit documentation URLs with current, more specific links throughout bits, blocks, and elements modules.
…text element properties, and add related validations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce Rich Text, Markdown, Table, and New Elements Support
Description of Changes
This pull request significantly updates the library by integrating comprehensive support for modern Slack Block Kit features, including Rich Text, a dedicated Markdown block, the new Table block, and several new interactive elements.
New Block Kit Components
Blocks Introduced
The following top-level block components are now supported:
RichText(Blocks.RichText()): Used to display formatted, structured text, typically the output of Slack's WYSIWYG message composer.Markdown(Blocks.Markdown()): A dedicated block type for rendering Slack-flavored Markdown text.Table(Blocks.Table()): Allows for the display of grid data, using Rich Text sections for cell content.RichTextSectionelements only.ContextActions(Blocks.ContextActions()): A block designed to hold related interactive elements, specificallyFeedbackButtonsorIconButton.Rich Text Composition Objects (Bits)
A full suite of composition objects for building Rich Text content is now available via the
Bitsnamespace:Bits.RichTextSection()Bits.RichTextList()bullet) or ordered (ordered) lists.Bits.RichTextQuote()Bits.RichTextPreformatted()Bits.RichTextText()Bits.RichTextEmoji()'wave') or Unicode value.Bits.RichTextLink()Bits.RichTextUser()@user).Bits.RichTextChannel()#channel).Bits.RichTextUsergroup()@usergroup).Bits.RichTextBroadcast()@here,@channel, or@everyone.Bits.RichTextDate()Bits.RichTextColor()Bits.RichTextTeam()New Interactive Elements
The following interactive and contextual elements are introduced:
RichTextInput(Elements.RichTextInput()): A dedicated input element for capturing rich, formatted text, supporting initial values and dispatch configuration.WorkflowButton(Elements.WorkflowButton()): A button that triggers a Slack Workflow when clicked.IconButton(Elements.IconButton()): A compact, icon-only button, often used in conjunction withContextActions.FeedbackButtons(Elements.FeedbackButtons()): A specialized element offering positive/negative feedback buttons (e.g., "Thumbs Up"/"Thumbs Down") for the AI assistants.Technical Updates
https://api.slack.com/) have been updated to the current standard format (https://docs.slack.dev/).RichTextElementTypeand updatedBlockTypeandElementTypeconstants were introduced to manage the new components.