GithubHelp home page GithubHelp logo

jeremeamia / slack-block-kit Goto Github PK

View Code? Open in Web Editor NEW
30.0 6.0 5.0 305 KB

DEPRECATED: Use https://github.com/slack-php/slack-php-block-kit instead

License: MIT License

PHP 100.00%
php slack block kit blocks chat chatbot

slack-block-kit's Introduction

slack-block-kit's People

Contributors

andi1986 avatar jeremeamia avatar nurul-umbhiya avatar shaneiseminger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

slack-block-kit's Issues

Feature Request: Block Parser to parse existing Block JSON into an Object Tree

Right now we can build the Block Json from the Element Objects, but what if we have the json and want to modify/add/delete something ?
The best scenario for this, and the reason why i request this feature, is actually the External Data Source for the Select Menu. on interacting with the dropdown, slack will send a request to the App's configured Options Load Api :
https://api.slack.com/reference/block-kit/block-elements#external_select
apparently slack did not docuement the request body of this particular request they send but i have debugged it and it seems inside the view property they simply send back the same whole block json that was actually previously sent to slack to open the view.
in addition to that they send further information like what value was typed into the input field and stuff like that (not in the block part!)

So we need some kind of Parser which accepts this Block JSON and creates an Object Tree so we can then modify it and then encode to json like in status quo.

Need to add max limit on modal title

Hi,
I'm getting error if modal title is more than 24 character long. I think we need to add some validation for modal title.

Errors I'm getting from slack api:
[0] => [ERROR] failed to match all allowed schemas [json-pointer:/view/title]
[1] => [ERROR] must be less than 24 characters [json-pointer:/view/title/text]

eg code:
$msg = SlackBuilder::newModal();
$msg->title('this is a really long title')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.