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

feat: ember specific data utils #9260

Merged
merged 26 commits into from
Mar 22, 2024
Merged

feat: ember specific data utils #9260

merged 26 commits into from
Mar 22, 2024

Conversation

runspired
Copy link
Contributor

@runspired runspired commented Mar 13, 2024

Adds @warp-drive/ember to assist with consuming requests from EmberData in components.

For the full motivations, read https://github.com/emberjs/data/blob/feat-ember/packages/ember/README.md

Note: We still recommend data being loaded by routes (or a future route replacement) to minimize potential for waterfalls and to provide the ability to hoist the data-fetch tree out of the render tree. We're considering at some point providing something along the lines of @warp-drive/router as an alternative to Ember's default router that enables more advanced data-fetch paradigms, and applications that continue to use the routing paradigm as their primary fetch paradigm today will find it easier to take advantage of the benefits this offers once it becomes available.


TODO (follow up PRs ok)

  • Test: if no cancelled block is present, abort may be handled by error block
  • Test/~Impl: if no error block is present, non-abort-error is rethrown
  • Test/Impl: cancelled block exposes state with retry function
  • Test/Impl: error block exposes state with retry function
  • Test/Impl: content block exposes state with refresh function
  • Test/Impl: content block exposes state with reload function
  • Test/Impl: content block exposes state with isRefreshing property
  • Test/Impl: content block exposes state with abort function when isRefreshing is true
  • Test/Impl: content block exposes state with latestRequest
  • Test/Impl: @Autorefresh enables automatic refresh after background resume
  • Test/Impl: @autorefreshThreshold enables configuration of amount of time in background required before autorefresh will be attempted on resume
  • Test/Impl: @autorefreshBehavior allows 'refresh' 'reload' and 'policy'

@runspired runspired added 🎯 canary PR is targeting canary (default) 🏷️ feat This PR introduces a new feature labels Mar 13, 2024
@runspired runspired self-assigned this Mar 13, 2024
@runspired runspired merged commit dfaa2b8 into main Mar 22, 2024
20 checks passed
@runspired runspired deleted the feat-ember branch March 22, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 canary PR is targeting canary (default) 🏷️ feat This PR introduces a new feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant