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

Async resolvers rerun on history change #646

Open
chrisvxd opened this issue Oct 7, 2024 · 0 comments
Open

Async resolvers rerun on history change #646

chrisvxd opened this issue Oct 7, 2024 · 0 comments

Comments

@chrisvxd
Copy link
Member

chrisvxd commented Oct 7, 2024

When browsing through undo/redo history, any async resolvePermissions and resolveFields methods re-run. This differs from resolveData, which persists through undo/redo history.

Since these two resolvers are always transient (i.e. never tracked on the application state), there's no way to sync them to the undo/redo history.

Steps to reproduce

  1. Visit demo.puckeditor.com/edit
  2. Select the Hero component
  3. Click "Select a quote"
  4. Select a quote
  5. Wait for resolution
  6. Undo
  7. Redo

What happened

A spinner showed and resolver re-ran

What I expected to happen

No spinner to show, but the permissions to automatically be recalculated.

@chrisvxd chrisvxd added ready Assumed ready enough to start type: bug 🐛 labels Oct 7, 2024
@chrisvxd chrisvxd changed the title Async resolvePermissions reruns on history change Async resolvers rerun on history change Oct 7, 2024
@chrisvxd chrisvxd added in triage and removed ready Assumed ready enough to start labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant