CGA1123 / slack-ruby-block-kit

A ruby wrapper for Slack's Block Kit
https://rubydoc.info/gems/slack-ruby-block-kit
MIT License
72 stars 30 forks source link

Allow "emoji" arg to be passed through to some constructors #175

Closed bmorton closed 1 year ago

bmorton commented 1 year ago

tl;dr I found a few places where passing through emoji helps make the DSL a bit easier to use.

Hey, thanks for this great gem! We have an internal implementation of the Slack BlockKit spec in our app and I'm looking at swapping in this great, open-source library instead. I've spiked out a replacement for our view handler and hooked it up to this BlockKit implementation so we can use it with ActionView. I've also built a prototype of an importer that will convert BlockKit JSON into this gem's DSL that's embedded in our new view layer.

As part of this conversion work, I've been using the somewhat full-featured Builder examples to import and the way I'm auto-generating the code assumes that it can pass emoji through this way to make sure the imported JSON and the JSON that's generated by the view match. Are you interested in this change?

Additionally, once I've got it deployed, I hope to be able to open source and share some of this if you think it'd be useful! Would you be interested in either the ActionView template handler or the JSON->DSL converter as part of this library? Or if I release it separately, could I get a mention in the README? I'd love to team up, let me know!

codecov[bot] commented 1 year ago

Codecov Report

Merging #175 (8e6029b) into master (a61b40c) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #175   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files          46       46           
  Lines         962      962           
=======================================
  Hits          954      954           
  Misses          8        8           
Files Changed Coverage Δ
lib/slack/block_kit/blocks.rb 100.00% <100.00%> (ø)
lib/slack/block_kit/element/radio_buttons.rb 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

CGA1123 commented 1 year ago

Hey @bmorton! Thanks for taking the time to contribute these changes -- they look great!

Would you be interested in either the ActionView template handler or the JSON->DSL converter as part of this library? Or if I release it separately, could I get a mention in the README? I'd love to team up, let me know!

This sounds really interesting/cool! Would you mind creating separate issues for these when time allows? Would be great to get more details on these!

CGA1123 commented 1 year ago

v0.23.0 shipped with these changes. :shipit: