Title: fix(database): retrieve initial list content once by cartant · Pull Request #820 · angular/angularfire · GitHub
Open Graph Title: fix(database): retrieve initial list content once by cartant · Pull Request #820 · angular/angularfire
X Title: fix(database): retrieve initial list content once by cartant · Pull Request #820 · angular/angularfire
Description: Closes #819 Checklist Issue number for this PR: #819 Docs included?: no Test units included?: no e2e tests included?: no In a clean directory, npm install, npm run build, and npm test run successfully? yes Description This PR simplifies the list implementation so that only the reducers associated with the child_added/remove/changed events manipulate the list's internal array. The value event is only used to determine when the initial load has been done. The on('value') and on('child_added', ...) calls are made within the same turn through the event loop, so only a single copy of the initial content is retrieved. The comments made in the commit that introduced this retrieve-the-initial-content-twice behaviour mention SDK quirks and nuances. By using only the child_XXX events and by not worrying whether the child_added event adds the last key before or after the value event fires, this PR's implementation should be sufficiently robust to cope with said quirks and nuances.
Open Graph Description: Closes #819 Checklist Issue number for this PR: #819 Docs included?: no Test units included?: no e2e tests included?: no In a clean directory, npm install, npm run build, and npm test run success...
X Description: Closes #819 Checklist Issue number for this PR: #819 Docs included?: no Test units included?: no e2e tests included?: no In a clean directory, npm install, npm run build, and npm test run success...
Opengraph URL: https://github.com/angular/angularfire/pull/820
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:93712a1d-d4ec-74f6-a70e-829729c56985 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A0FA:43F78:1957154:209229C:6A5C6432 |
| html-safe-nonce | 226bd079d554ca15b75273e9dc08d14af99042518bbd35abf11a606f34ee1752 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEZBOjQzRjc4OjE5NTcxNTQ6MjA5MjI5Qzo2QTVDNjQzMiIsInZpc2l0b3JfaWQiOiI0NzQ4NDQyOTI4NTgyMjU1NjY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7b72509fb37fcca70c9e863233e506f7764a7064f8f2b9b7489d9c5697f68b64 |
| hovercard-subject-tag | pull_request:105559723 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angularfire/pull/820/files |
| twitter:image | https://avatars.githubusercontent.com/u/3878593?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3878593?s=400&v=4 |
| og:image:alt | Closes #819 Checklist Issue number for this PR: #819 Docs included?: no Test units included?: no e2e tests included?: no In a clean directory, npm install, npm run build, and npm test run success... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width