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

fix(utils): multiple redos at once with proxyWithHistory #354

Merged
merged 3 commits into from
Feb 8, 2022

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Feb 8, 2022

close #323

@vercel
Copy link

vercel bot commented Feb 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/valtio/7wLQxXhQsfCgs3AcGiBUJEx7fAKk
✅ Preview: https://valtio-git-fix-issue-323-pmndrs.vercel.app

@dai-shi dai-shi marked this pull request as draft February 8, 2022 02:26
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 8, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit eaa96e4:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Size Change: +17 B (0%)

Total Size: 34.5 kB

Filename Size Change
dist/esm/utils.js 3.91 kB +6 B (0%)
dist/system/utils.js 4.14 kB +6 B (0%)
dist/umd/utils.js 4.71 kB +2 B (0%)
dist/utils.js 4.54 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size
dist/esm/index.js 1.36 kB
dist/esm/macro.js 613 B
dist/esm/vanilla.js 1.84 kB
dist/index.js 1.45 kB
dist/macro.js 910 B
dist/system/index.js 1.59 kB
dist/system/macro.js 721 B
dist/system/vanilla.js 1.98 kB
dist/umd/index.js 1.59 kB
dist/umd/macro.js 1.06 kB
dist/umd/vanilla.js 2.1 kB
dist/vanilla.js 1.96 kB

compressed-size-action

@dai-shi dai-shi mentioned this pull request Feb 8, 2022
Copy link

@hee10k hee10k left a comment

Choose a reason for hiding this comment

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

It seems this code makes just 1 snapshot.
so you can change code like below

// fireEvent.click(getByText('inc'))
// fireEvent.click(getByText('inc'))
await waitFor(() => fireEvent.click(getByText("inc")));
await waitFor(() => fireEvent.click(getByText("inc")));

@dai-shi
Copy link
Member Author

dai-shi commented Feb 8, 2022

It seems this code makes just 1 snapshot.

wow! thanks so much!!

@dai-shi
Copy link
Member Author

dai-shi commented Feb 8, 2022

eaa96e4 passes the tests. I'm not 100% sure if there are any other cases that this can't handle, but let's go with this for now.

@dai-shi dai-shi marked this pull request as ready for review February 8, 2022 07:32
@dai-shi dai-shi merged commit 1eeea09 into main Feb 8, 2022
@dai-shi dai-shi deleted the fix/issue-323 branch February 8, 2022 11:45
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.

Bug with history (again?)
2 participants