slackapi / deno-slack-sdk

SDK for building Run on Slack apps using Deno
https://api.slack.com/automation
MIT License
168 stars 28 forks source link

[FEATURE] Ability to position unfurled workflow links horizontally in canvas through code #372

Open djmgit opened 1 month ago

djmgit commented 1 month ago

How do I place unfurled workflow links horizontally in canvas through code?

As of now I believe Canvas does not support block kit. We only have markdown at our disposal. We plan to show quite a few workflow automation unfurled links on the canvas so that it appear nicely as cards. We are generating the channel canvas automatically via code. Now by default the cards layout is vertical that is they are stacked on top of one another. We want the layout to be horizontal. Manually I can open the canvas and drag one card on to another to squeeze them into a horizontal line. But doing it manually is not an option. How can we do it from code?

Right now I am doing this:

shortcut_list = [f"![]({link})" for link in shortcut_links]
markdown = "\n\n".join(shortcut_list)

I have tried the following:

markdown = "  ".join(shortcut_list)

But this does not put unfurled links.

Alternatively is there an API to create a channel canvas from a template? Then I can use a prebaked template where I will create the horizontal layout one time and then use it to create other canvases.

Environment

"deno-slack-sdk/": "https://deno.land/x/deno_slack_sdk@2.14.2/", "deno-slack-api/": "https://deno.land/x/deno_slack_api@2.8.0/",

deno 1.44.4 (release, aarch64-apple-darwin) v8 12.6.228.9 typescript 5.4.5

ProductName: macOS ProductVersion: 13.6.7 BuildVersion: 22G720 Darwin Kernel Version 22.6.0: Mon Apr 22 20:51:27 PDT 2024; root:xnu-8796.141.3.705.2~1/RELEASE_ARM64_T6020

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

djmgit commented 1 month ago

cc: @filmaj

filmaj commented 1 month ago

Thanks for filing the issue! I will bring this up internally. Also, on your end, emailing feedback@slack.com and mentioning this is a feature request + linking to this issue may help put more priority on this feature during prioritization and roadmapping.

djmgit commented 1 month ago

@filmaj thanks a lot 👍 it would be great if there is way we can know the expected timeline for this. Actually we are now using Canvas + workflow automation quite extensively and this is something which we are looking forward to. As our content grows, puting everything stacked on top of each other with scrolling is degrading the user experience 😅 .

filmaj commented 1 month ago

Sorry, I cannot provide that information, as it is not from my team and out of my hands. Your best bet is to get that information from our customer support feedback@slack.com line.

djmgit commented 1 month ago

@filmaj got it, thanks once again 🙇