-
Notifications
You must be signed in to change notification settings - Fork 13
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
Meta PR: Implement offline support through CozyPouchLink #1507
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
Ldoppea
force-pushed
the
feat/meta_offline
branch
from
July 26, 2024 14:54
16237f8
to
0049a23
Compare
2 tasks
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Jul 30, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Jul 30, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Jul 30, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Aug 26, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
2 tasks
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Aug 26, 2024
We want mespapiers 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
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Aug 27, 2024
We want mespapiers 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
5 tasks
This was referenced Sep 4, 2024
Ldoppea
force-pushed
the
feat/meta_offline
branch
from
September 9, 2024 14:25
3eb3aa7
to
4f3e14e
Compare
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Sep 13, 2024
We want mespapiers 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
1 task
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Sep 13, 2024
We want mespapiers 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
Ldoppea
added a commit
to cozy/cozy-home
that referenced
this pull request
Sep 16, 2024
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
Ldoppea
added a commit
to cozy/cozy-home
that referenced
this pull request
Sep 19, 2024
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
4 tasks
Ldoppea
force-pushed
the
feat/meta_offline
branch
2 times, most recently
from
September 19, 2024 14:01
d1aee07
to
09c2314
Compare
Previous implementation would not be backward compatible with older Flagship app versions By checking for method availability, we ensure the code is called only on the correct Flagship app versions, otherwise the old process is called Related PR: #1518
In previous implementation we did not await for the `persistVirtualDocuments()` result before completing the request This was done because the persistance was not mandatory for the request's result and doing it in parallel would be a good way to optimize timings But in some recent experiments we found a scenario where we would benefit from the `await` in order to some external code until the data is actually persisted Related PR: #1486
In the Flagship app, we want to be able to reset the local PouchDB files in order to prevent beta testers to be blocked by an erroneous Pouch replication To make this possible we want to expose a public method that resets all the cozy-client's links
`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 should clarify that this link should be run on the web side and not on the Flagship app side
Ldoppea
force-pushed
the
feat/meta_offline
branch
from
September 24, 2024 09:35
86b1950
to
b13b3db
Compare
Ldoppea
added a commit
to cozy/cozy-libs
that referenced
this pull request
Sep 24, 2024
This version introduces the new `downloadFile()` method that is compatible with Offline mode Related PR: cozy/cozy-client#1507 BREAKING CHANGE: cozy-viewer now requires cozy-client >= 49.0.0 (used for offline support)
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 24, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 24, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 24, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-libs
that referenced
this pull request
Sep 24, 2024
This version introduces the new `downloadFile()` method that is compatible with Offline mode Related PR: cozy/cozy-client#1507 BREAKING CHANGE: cozy-viewer now requires cozy-client >= 49.0.0 (used for offline support)
Ldoppea
added a commit
to cozy/cozy-home
that referenced
this pull request
Sep 24, 2024
`cozy-client` has been upgraded to `49.0.0` in order to retrieve the Offline mode support `cozy-intent` has been upgraded to `2.23.0` as it is the new minimal version for `cozy-client` since `49.0.0` Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-home
that referenced
this pull request
Sep 24, 2024
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
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Sep 24, 2024
`cozy-client` has been upgraded to `49.0.0` in order to retrieve the Offline mode support `cozy-intent` has been upgraded to `2.23.0` as it is the new minimal version for `cozy-client` since `49.0.0` Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Sep 24, 2024
We want mespapiers 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
Ldoppea
added a commit
to cozy/mespapiers
that referenced
this pull request
Sep 25, 2024
We want mespapiers 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
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 25, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 25, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Sep 25, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
JF-Cozy
added a commit
to cozy/cozy-libs
that referenced
this pull request
Nov 5, 2024
JF-Cozy
added a commit
to cozy/cozy-libs
that referenced
this pull request
Nov 5, 2024
JF-Cozy
added a commit
to cozy/cozy-libs
that referenced
this pull request
Nov 5, 2024
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 12, 2024
We want the Flagship app to work when offline To make this possible we configure cozy-client with CozyPouchLink which role will be to synchronize necessary doctypes into a local PouchDB and serve them from it instead of from the cozy-stack when the device is offline For now the list of synchronized doctypes is hardcoded but in the future we expect to implement a dynamic list based on cozy-apps' manifests Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 12, 2024
In previous commit we configured cozy-client to use CozyPouchLink for its queries This commit also adds StackLink as the first Link so by default it will do its queries through the remote cozy-stack CozyClient has been modified to handle offline mode and redirect to the next link when it is detected Related PR: cozy/cozy-client#1507
Ldoppea
added a commit
to cozy/cozy-flagship-app
that referenced
this pull request
Nov 12, 2024
This plugin is required by cozy-client to process `find` queries Related PR: cozy/cozy-client#1507
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.
This PR is a temporary "main" for all Offline features until everything is ready to be merged into our main branch
PR List:
StackLink.request()
when offline #1487downloadFile
method infile
model #1518reset()
method #1533Related PRs:
downloadFile()
method from cozy-client cozy-ui#2690downloadFile()
method from cozy-client cozy-libs#2581