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

Better adaptors pt 3 #198

Merged
merged 14 commits into from
Nov 3, 2023
Merged

Better adaptors pt 3 #198

merged 14 commits into from
Nov 3, 2023

Conversation

chrisvxd
Copy link
Member

@chrisvxd chrisvxd commented Nov 1, 2023

This PR introduces a third round of improvements to adaptors, plus related issues.

  1. Add loading state to the external field modal
  2. Slightly delay loading spinners, as resolveData sometimes returns instantly
  3. Process resolveData asynchronously
  4. Significantly improve render performance of field input changes
  5. Better integration of resolveData with undo/redo history
  6. Backwards compatibility for adaptors (which were removed in feat: flatten adaptor onto external fields #195)

Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
puck-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 3, 2023 10:48am

Base automatically changed from flatten-adaptors-onto-external-fields to main November 2, 2023 18:03
Running the dispatcher on each change is expensive, and waiting for it to run before showing the user's input creates a significant lag.

This change uses local state for all inputs, to give the user immediate feedback, and debounces the dispatcher call.

useDeferredValue doesn't help us here, since the reducer is expensive regardless of the UI render.
@chrisvxd chrisvxd force-pushed the better-adaptors-pt-3 branch from a77da48 to 8183138 Compare November 3, 2023 10:46
@chrisvxd chrisvxd marked this pull request as ready for review November 3, 2023 10:57
@chrisvxd chrisvxd merged commit d22150a into main Nov 3, 2023
2 checks passed
@chrisvxd chrisvxd deleted the better-adaptors-pt-3 branch November 3, 2023 10:57
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.

1 participant