-
Notifications
You must be signed in to change notification settings - Fork 663
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
Types: split single index.ts file into files based on function/category #1656
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the structure! Left a few small suggestions most notably renaming elements.ts as block-elements.ts.
export type KnownBlock = ImageBlock | ContextBlock | ActionsBlock | DividerBlock | | ||
SectionBlock | InputBlock | FileBlock | HeaderBlock | VideoBlock; | ||
|
||
export interface ActionsBlock extends Block { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems worth it to adding additional annotation to more easily find the documentation link while we're at it?
Fine to punt to the later TODO moment referenced in the comments above as well.
export interface ActionsBlock extends Block { | |
// Reference: https://api.slack.com/reference/block-kit/blocks#actions | |
export interface ActionsBlock extends Block { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exactly, I will be doing exactly these kind of changes in the next pull request 😄 I didn't want to add more additional lines in this specific PR as the diff would be too confusing given the movement of code across files. I think that in the next PR, though, these kinds of documentation additions you suggest would be clearer and easier to review.
@@ -0,0 +1,38 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that we'll just be able to poof this file when major version bump comes along 🧹 !
Co-authored-by: Sarah Jiang <[email protected]>
Co-authored-by: Sarah Jiang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, LGTM!
Summary
This is purely a text-movement PR; no changes (other than a few comments at the top of certain files) from the base.
I'm mainly looking for feedback on the organization of the files. If you have feedback on directory structure or file names, let me know!