-
Notifications
You must be signed in to change notification settings - Fork 26
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: Handle offline mode in Flagship app #2186
base: master
Are you sure you want to change the base?
Conversation
BundleMonFiles updated (7)
Unchanged files (6)
Total files change +7.94KB +0.25% Final result: ✅ View report in BundleMon website ➡️ |
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
`fetchJSON()` calls are not compatible with offline mode unless we wrap them in the `.query()` dsl Recently we added a `fetchJSON()` call inside of cozy-home in order to display the new grouped-by-category folders in the home's konnectors section So we want to move this call inside of the AppsRegistryCollection in order to make it compatible with offline mode Related PR: cozy/cozy-home#2186
3041534
to
797a312
Compare
In cozy/cozy-client#1460 we implemented a new `useSettings` hook This hook can be used in `DefaultRedirectionSnackbar` in order to simplify code and homogenize the way we access cozy-apps settings
We want cozy-home to be compatible with the new Flagship app's Offline mode When hosted in a Flagship app's WebView we now want to use FlagshipLink instead of StackLink in cozy-client This link will allow to redirect all queries to the Flagship app that will handle data access when offline but also when online Related PR: cozy/cozy-client#1507 Related PR: cozy/cozy-flagship-app#1239
@@ -13,6 +13,7 @@ | |||
}, | |||
"version": "1.85.0", | |||
"licence": "AGPL-3.0", | |||
"offline_support": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this documented somewhere? If not, we should do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation is not merged yet, but you can preview it there: https://github.com/cozy/cozy-flagship-app/blob/28394cac703df96e00274cef6e985a8060046dd1/docs/how-to-make-cozy-app-offline-compatible.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we should also think to add it here: https://docs.cozy.io/en/cozy-apps-registry/#properties-meaning-reference
At startup we check some "app highlights" status, typicallky for backup or geolocation tracking. In the tracking case, we need to query the database in order to check if there is some geolocation data. This query might fail in offline if the local database is not ready. And this failure was causing an infinite loop, because a retry was made for each failed query.
We want cozy-home to be compatible with the new Flagship app's Offline mode
When hosted in a Flagship app's WebView we now want to use FlagshipLink instead of StackLink in cozy-client
This link will allow to redirect all queries to the Flagship app that will handle data access when offline but also when online
Related PR: cozy/cozy-client#1507
Related PR: cozy/cozy-flagship-app#1239
Related PR: cozy/cozy-libs#2562
Related PR: cozy/cozy-libs#2581
Related PR: cozy/cozy-libs#2585
TODO:
downloadFile()
method from cozy-client cozy-libs#2581 is merged