slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.2k stars 215 forks source link

BlockKit Helper #316

Open saraid opened 4 years ago

saraid commented 4 years ago

Hello, I've spent a few hours putting together what I think is a fairly good prototype for composing BlockKit-based messages in Ruby. Currently, it has what I personally need from it for my own project, and no tests or meaningful docs. That's adequate for my personal project, but not for contributing to something bigger.

I'd like to gauge how much interest there would be in integrating my stuff into slack-ruby-client. (Alternatively, I could look into releasing it as a separate gem that can merely plug into slack-ruby-client.) From that, I figure I could decide how much work to put in to finish fleshing out all the other classes and writing an adequate test suite and documentation for the whole thing.

Current progress is over here: https://github.com/slack-ruby/slack-ruby-client/compare/master...saraid:saraid/slack-blockkit-helper

dblock commented 4 years ago

I think Block Kit is its own thing, since it doesn't depend on the Slack API in any way. So I vote for a separate project. I would call it slack-block-kit (to match the Block Kit spelling) and would be happy to host that inside the slack-ruby organization.

saraid commented 4 years ago

Oh, I like the sound of that. What would be involved?

dblock commented 4 years ago

I can just make a repo for you and make you admin.

Before I do that, have you seen https://github.com/CGA1123/slack_block_kit-ruby?

saraid commented 4 years ago

Ooh, I have not. I think that I personally prefer my DSL, but they've definitely gotten further along in fleshing it out to be generally useful.

CGA1123 commented 4 years ago

Hey @saraid, happy to have a look at the DSL and making improvements! The one currently implemented is quite verbose, so anything to cut it down would be a benefit 😄

sicktastic commented 4 years ago

Does slack-ruby-client not support all the chat.postMessage? I am trying to create a block message but I can't seem to send username with chat_postMessage

dblock commented 4 years ago

Does slack-ruby-client not support all the chat.postMessage? I am trying to create a block message but I can't seem to send username with chat_postMessage

It supports all, including username.

saraid commented 4 years ago

@CGA1123 I've put up my work so far at https://github.com/saraid/slack-block-kit ; feel free to steal ideas or techniques from there. I'd be happy to explain anything that's unclear in it.