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 keepLatest util #573

Merged
merged 1 commit into from
Aug 4, 2022
Merged

add keepLatest util #573

merged 1 commit into from
Aug 4, 2022

Conversation

NullVoxPopuli
Copy link
Owner

No description provided.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 30, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3e3d02c
Status: ✅  Deploy successful!
Preview URL: https://ff679af6.ember-resources.pages.dev
Branch Preview URL: https://glint-testing.ember-resources.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Jul 30, 2022

Estimated impact to a consuming app, depending on which bundle is imported

js min min + gzip min + brotli
/index.js 12.49 kB 3.13 kB 1.28 kB 1.13 kB
├── core/class-based/index.js 4.1 kB 1.8 kB 883 B 761 B
├── core/function-based/index.js 5.71 kB 552 B 269 B 213 B
└── core/use.js 1.73 kB 415 B 256 B 203 B
/util/cell.js 1.93 kB 777 B 395 B 336 B
/util/debounce.js 2.64 kB 771 B 408 B 340 B
/util/ember-concurrency.js 5.17 kB 1.56 kB 745 B 632 B
/util/function-resource.js 216 B 154 B 123 B 87 B
/util/function.js 4.03 kB 1.78 kB 703 B 595 B
/util/helper.js 1.8 kB 303 B 218 B 177 B
/util/keep-latest.js 1.75 kB 520 B 292 B 238 B
/util/map.js 5.66 kB 2.38 kB 993 B 847 B
/util/remote-data.js 4.86 kB 1.75 kB 674 B 593 B

@NullVoxPopuli NullVoxPopuli changed the title migrate tests to gts add keepLatest util and migrate tests to gts Aug 4, 2022
@NullVoxPopuli NullVoxPopuli force-pushed the glint-testing branch 5 times, most recently from 7b18a43 to b95749b Compare August 4, 2022 22:16
@NullVoxPopuli NullVoxPopuli changed the title add keepLatest util and migrate tests to gts add keepLatest util Aug 4, 2022
A utility decorator for smoothing out changes in upstream data between
refreshes / reload.

when using [[RemoteData]] (or some other promise-based "eventually a value" resource),
the value returned from the API is what's useful to see to users. But if the URL
changes, the remote request will start anew, and isLoading becomes true, and the value
is falsey until the request finishes. This can result in some flicker
until the new request finishes.

To smooth that out, we can use [[keepLatest]]
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review August 4, 2022 22:19
@NullVoxPopuli NullVoxPopuli merged commit 81f9769 into main Aug 4, 2022
@NullVoxPopuli NullVoxPopuli deleted the glint-testing branch August 4, 2022 22:26
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant