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

Add withMerging #5696

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Add withMerging #5696

merged 1 commit into from
Aug 20, 2024

Conversation

felixfeng33
Copy link
Contributor

@felixfeng33 felixfeng33 commented Aug 14, 2024

Description
Currently, Slate lacks an API to merge a series of history records to the top of the stack. In some cases, the withMerging function is very useful, for example the upload status from pending to success and AI generate a series of text withMerging can make sure to remove it in one times redo.

Issue
Fixes: (link to issue)

Example
A GIF or video showing the old and new behaviors after this pull request is merged. Or a code sample showing the usage of a new API. (If you don't include this, your pull request will not be reviewed as quickly, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.)

Context
If your change is non-trivial, please include a description of how the new logic works, and why you decided to solve it the way you did. (This is incredibly helpful so that reviewers don't have to guess your intentions based on the code, and without it your pull request will likely not be reviewed as quickly.)

Checks

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn fix.)
  • The relevant examples still work. (Run examples with yarn start.)
  • You've added a changeset if changing functionality. (Add one with yarn changeset add.)

Copy link

changeset-bot bot commented Aug 14, 2024

🦋 Changeset detected

Latest commit: 6df3336

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate-history Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@dylans dylans left a comment

Choose a reason for hiding this comment

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

This looks fine. Ideally we would add something to the docs as well, but I won't block the PR for that.

@dylans dylans merged commit e5fed79 into ianstormtaylor:main Aug 20, 2024
11 checks passed
This was referenced Aug 20, 2024
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