Skip to content

Artur rich media - #11

Merged
36 commits merged into
mainfrom
artur-rich-media
Mar 1, 2026
Merged

Artur rich media#11
36 commits merged into
mainfrom
artur-rich-media

Conversation

@shahidfoy

Copy link
Copy Markdown
Member

🚀 Pull Request

📌 Summary

This PR introduces a structured Slack messaging system that enables sending rich, block-based messages.

🧪 What Does This Fix or Improve?

  • Bug fix
  • New feature
  • Performance improvement
  • Documentation update
  • Other (describe below)

🔍 Changes

  • Added block-based messaging system (SlackBlock, SlackElement) with support for:

    • TextBlock, ImageBlock, GifBlock
    • ActionsBlock (for grouping interactive elements)
  • Introduced button elements via ButtonElement:

    • Supports both url (link buttons) and actionId (future interaction hooks)
  • Implemented builder pattern across the API:

    • SlackMessage.builder()
    • Builders for all blocks and elements
    • Enforced validation rules (no mixing raw/custom blocks, required fields, etc.)
  • Added validation framework:

    • SlackValidator<T> interface
    • Validators for all blocks and elements
    • BasicSlackValidators registry
    • SlackBlockValidator with recursive (composite) validation
  • Improved error handling:

    • Introduced SlackErrorMapper for errors returned by Slack API
    • Parses Slack API errors into readable, structured messages
  • Enhanced BotService:

    • Integrated validation layer
    • Added block building (SlackBlockBuilder)
    • Centralized message sending and error handling
  • Support for raw Slack Block Kit (LayoutBlock) usage is hardly changed:

    • Allows advanced/custom Slack blocks
    • Prevents mixing with custom block abstractions
  • Refactored and documented codebase with consistent Javadoc:

    • Clear API usage
    • Examples and validation rules included
  • Updated README with:

    • Improved usage examples
    • Builder-based approach
    • Rich media

🧪 Testing Steps

TODO. I will open an issue to get some help or cover it after Interactive event handling implementation

📸 Screenshots (if applicable)

Attach images or logs here.

🔗 Related Issues

Partially #9

@shahidfoy shahidfoy closed this pull request by merging all changes into main in 37a97c2 Mar 1, 2026
@shahidfoy
shahidfoy deleted the artur-rich-media branch March 1, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants