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

feature(provider): allow thread tombstoning and restoration #885

Merged
merged 5 commits into from
Dec 10, 2024

Conversation

bdbch
Copy link
Member

@bdbch bdbch commented Dec 9, 2024

This pull request to packages/provider introduces several enhancements and new features related to thread management in the TiptapCollabProvider class. The changes include the addition of new options for handling threads, improvements to thread deletion and restoration, and updates to the type definitions.

Enhancements to thread management:

Type definition updates:

@@ -17,6 +19,15 @@ const defaultDeleteCommentOptions: DeleteCommentOptions = {
deleteThread: false,
}

const defaultGetThreadsOptions: GetThreadsOptions = {
types: ['undeleted'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undeleted isn't a word and doesn't sound right.

How about archived & not archived. Don't need two states, when people get, it should only ever be not archived. And asking for archived means you want archived too.

Like includeArchived?: true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or includeDeleted if you wanna stick to that naming

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to use the types as you can control what you want to get this way, but I'm totally okay with renaming the types.

I used an enum + called them archived and unarchived for now.

nperez0111
nperez0111 previously approved these changes Dec 9, 2024
Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the naming, the change looks good.

@bdbch bdbch merged commit 6a71700 into main Dec 10, 2024
2 of 3 checks passed
@bdbch bdbch deleted the feature/thread-deletion-tombstoning branch December 10, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants