feat(slack/send-block-kit-message): allow to set unfurl properties in block messages
WHY
Adds unfurl_media and unfurl_links options to slack send-block-kit-message action.
Background
Contrary to send-custom-message which had this functionality for a while: https://github.com/PipedreamHQ/pipedream/blob/f2ea490cf78f3021ca875a2a46a53e0e1a6c4366/components/slack/actions/send-custom-message/send-custom-message.mjs#L36-L47
currently, it is not possible to define whether to unfurl links and media in block messages or not.
This adds the two optional properties to the send-block-kit-message action.
Note: there seem to be quite a few props that are not passed through to custom actions from https://github.com/PipedreamHQ/pipedream/blob/f2ea490cf78f3021ca875a2a46a53e0e1a6c4366/components/slack/slack.app.mjs#L7 - is there a specific reason for it? Otherwise we could all add them to
send-messagecommon module here: https://github.com/PipedreamHQ/pipedream/blob/f2ea490cf78f3021ca875a2a46a53e0e1a6c4366/components/slack/actions/common/send-message.mjs#L7 and they'd automatically inherited via https://github.com/PipedreamHQ/pipedream/blob/f2ea490cf78f3021ca875a2a46a53e0e1a6c4366/components/slack/actions/send-block-kit-message/send-block-kit-message.mjs#L38 in each of the consumers. That way all current supported options plus all future new options would automatically be supported by all slack action providers, which feels like is what we want?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs-v2 | ⬜️ Ignored (Inspect) | Visit Preview | May 20, 2024 11:43am | |
| pipedream-docs-redirect-do-not-edit | ⬜️ Ignored (Inspect) | May 20, 2024 11:43am |
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
- [ ] Create components to address specific use cases whenever possible
- [ ] Component
keys should follow the formatapp_name_slug-slugified-component-name - [ ] Components should follow the standard directory structure
- [ ] Prefer Node.js client libraries to REST APIs
- [ ] When making API requests, handle pagination to ensure all data / events are processed
- [ ] Use
secretprops to capture sensitive data - [ ] Props and methods should be defined in app files whenever possible
- [ ] Document methods with JS Docs
- [ ] Use
optionalprops whenever possible, and set adefaultvalue where you can - [ ] Use async options to accept user input wherever possible
Thank you for your contribution! Looks good, ready for QA
Thank you! Did you see my note? Would it make sense to pass through properties by default?
Thank you for your contribution! Looks good, ready for QA
And one more question: is there an easy way for me to test such changes against my pipedream workspace?
Thank you for your contribution! Looks good, ready for QA
Thank you! Did you see my note? Would it make sense to pass through properties by default?
Hi @joscha . I think it makes sense to pass through the available properties. We'll be making some updates to Slack components in the near future. @malexanderlim This is something to consider for the upcoming Slack Usability Audit.
To test changes you make to components, you can use the Pipedream CLI and pd publish actions to your workspace. They'll show up under "My Actions" when you're adding a step in the workflow.
Hi @joscha . I think it makes sense to pass through the available properties. We'll be making some updates to Slack components in the near future. @malexanderlim This is something to consider for the upcoming Slack Usability Audit.
After we merged this PR, I'd open another one that reuses the properties, is that okay?
To test changes you make to components, you can use the Pipedream CLI and
pd publishactions to your workspace. They'll show up under "My Actions" when you're adding a step in the workflow.
Is there a special flow I can use in this component, especially because it references multiple files, etc.? The pipedream cli doesn't discover the dependency graph and uploads all needed references, does it?
Hi everyone, all test cases are passed! Ready for release!
Test report https://vunguyenhung.notion.site/feat-slack-send-block-kit-message-allow-to-set-unfurl-properties-in-block-messages-12003-c26b617a60ec483e9c40c3a6f649f942
Hi everyone, all test cases are passed! Ready for release!
Test report https://vunguyenhung.notion.site/feat-slack-send-block-kit-message-allow-to-set-unfurl-properties-in-block-messages-12003-c26b617a60ec483e9c40c3a6f649f942
Now I'm hungry 😋
@joscha
Hi @joscha . I think it makes sense to pass through the available properties. We'll be making some updates to Slack components in the near future. @malexanderlim This is something to consider for the upcoming Slack Usability Audit.
After we merged this PR, I'd open another one that reuses the properties, is that okay?
Yes, you can open another PR with the additional changes.
To test changes you make to components, you can use the Pipedream CLI and
pd publishactions to your workspace. They'll show up under "My Actions" when you're adding a step in the workflow.Is there a special flow I can use in this component, especially because it references multiple files, etc.? The pipedream cli doesn't discover the dependency graph and uploads all needed references, does it?
You can git clone the pipedream repo or your forked repo. Then use the pipedream CLI to publish individual actions to your workspace. Publishing the action will include any dependencies that are needed.