Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test utility for validating blocks #1652

Open
4 of 10 tasks
kronosapiens opened this issue Nov 9, 2022 · 8 comments
Open
4 of 10 tasks

Test utility for validating blocks #1652

kronosapiens opened this issue Nov 9, 2022 · 8 comments
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity discussion M-T: An issue where more input is needed to reach a decision

Comments

@kronosapiens
Copy link

kronosapiens commented Nov 9, 2022

Description

It would be very convenient if this library including a utility for validating blocks. Inside of our tests, we could produce blocks and run them through this utility, which would return true if the block is valid or false otherwise. Currently, blocks are a bit brittle in that changes to block structure can produce errors which can only be debugged interactively through a dummy Slack channel. I don't know what this would involve, but it would be a great feature.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

@mwbrooks mwbrooks added the discussion M-T: An issue where more input is needed to reach a decision label Nov 9, 2022
@mwbrooks
Copy link
Member

mwbrooks commented Nov 9, 2022

Hi @kronosapiens 👋🏻

Thanks for taking the time to share this idea 💡 I agree, Block Kit is essential for Slack apps but challenging to design and more difficult once interactivity is layered on.

I've shared your idea with the Block Kit team, so it's on their radar. 🙌🏻

A future feature of the Slack API is the App Manifest, where you can define your app's metadata using JSON (e.g. app name, description, scopes, events, request URLs, etc). Along with this feature, there is a manifest validation API endpoint. It'll tell you whether the manifest has validate properties, but it'll also notify you about breaking changes (e.g. removing a scope that is currently used by the app).

☝🏻 When you're describing a test utility to validate blocks, this type of API endpoint immediately came to mind.

While not as helpful, I imagine you've already seen the Block Kit Builder web page? Right now, a common practice is to copy & paste your blocks into it but I know that this has limited functionality for real-world blocks.

@github-actions
Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@srajiang srajiang added auto-triage-skip Prevent this issue from being closed due to lack of activity and removed auto-triage-stale labels Dec 14, 2022
@srajiang
Copy link
Member

Marking this issue as unstaleable, to keep the issue open for further community and commenting ➕ that I would like to see some sort of improved officially maintained utility for helping validate or author Block Kit.

@jbwc
Copy link

jbwc commented May 16, 2024

Would also love this

@jordanmnunez
Copy link

Would also love this

+1

@Salec
Copy link

Salec commented May 24, 2024

+1

@kronosapiens
Copy link
Author

kronosapiens commented May 25, 2024

A minimum solution here could be some sort of utility which validates a block and returns true/false, which we could then incorporate into some sort of testing framework. E.g.

const block = createBlock();
expect(bolt.isValid(block)).to.be.true;

This would really cut down on the time spent in development debugging through test workspaces.

@michael-seungsup-kim
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity discussion M-T: An issue where more input is needed to reach a decision
Projects
None yet
Development

No branches or pull requests

7 participants