-
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BundleMonFiles updated (3)
Unchanged files (10)
Total files change +8.89KB +0.25% Final result: ✅ View report in BundleMon website ➡️ |
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 19, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 19, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 19, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 23, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 23, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 24, 2024
`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
This was referenced Sep 24, 2024
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 24, 2024
`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
Ldoppea
added a commit
to cozy/cozy-client
that referenced
this pull request
Sep 24, 2024
`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
paultranvan
reviewed
Jan 29, 2025
cd96ab4
to
ab7e80b
Compare
paultranvan
approved these changes
Feb 7, 2025
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.
🚀
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
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.
`cozy-dataproxy-lib` has been upgraded to `3.4.1` in order to retrieve a fix on the Assistant icon that would not be displayed on Flagship app in offline mode Related PR: cozy/cozy-libs#2732
14175ea
to
e7f9258
Compare
Since cozy/cozy-libs#2711 `cozy-pouch-link` is now a peer-dependency of cozy-dataproxy-lib So we want to add it to cozy-home However it won't be used in the cozy-home context, we may want in the future to split the cozy-dataproxy-lib into 2 dedicated libraries for the consuming apps and for the dataproxy part (which is the one requiring cozy-pouch-link)
At each new focus, a full render was triggered, making a visual refresh for the user. To fix this, we do not use query options in the ReloadFocus component, because of: cozy/cozy-client#931 Especially for the apps query, the fetchPolicy is always applied here, because it is called elsewhere, making the query's lastUpdate very close in time. And because of this, the home is rendered after each focus, as the same query gives different result (a complete response, vs an early empty return in this case)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Update cozy-viewer after feat(cozy-viewer): Use new(already done on master branch)downloadFile()
method from cozy-client cozy-libs#2581 is merged