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

feat: Handle offline mode in Flagship app #660

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented 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
Related PR: cozy/cozy-libs#2562
Related PR: cozy/cozy-ui#2690
Related PR: cozy/cozy-libs#2581
Related PR: cozy/cozy-libs#2585

### ✨ Features

* Add support for Offline mode in Flagship app

### 🐛 Bug Fixes

*

### 🔧 Tech

*

TODO:

Copy link

bundlemon bot commented Aug 27, 2024

BundleMon

Files updated (6)
Status Path Size Limits
vendors/mespapiers.(hash).js
1.95MB (+3.37KB +0.17%) -
services/metadataMigration/mespapiers.js
398.1KB (+2.75KB +0.7%) -
services/launchTriggers/mespapiers.js
395.89KB (+2.62KB +0.67%) -
services/expiration/mespapiers.js
1.75MB (+2.54KB +0.14%) -
app/mespapiers.(hash).js
1.64MB (+346B +0.02%) -
intents/mespapiers.(hash).js
83.99KB (-622B -0.72%) -
Unchanged files (35)
Status Path Size Limits
img/IlluPassportDate.(hash).png
38.4KB -
img/IlluPassportNumber.(hash).png
37.98KB -
img/IlluPassport.(hash).png
37.87KB -
vendors-mespapiers.(hash).(hash).min.css
37.44KB -
img/IlluNationalHealthInsuranceCardNumber.(ha
sh).png
24.89KB -
img/IlluNationalHealthInsuranceCardDateHelp.(
hash).png
24.64KB -
img/IlluCafNumberHelp.(hash).png
21.67KB -
img/IlluIdCardNumberHelp.(hash).png
13KB -
img/IlluDriverLicenseBack.(hash).png
12.72KB -
img/IlluIdCardFront.(hash).png
12.58KB -
img/IlluIdCardBack.(hash).png
12.43KB -
img/IlluResidencePermitExpirationDateHelp.(ha
sh).png
12.17KB -
img/IlluResidencePermitNumberHelp.(hash).png
12.16KB -
img/IlluIdCardExpirationDateHelp.(hash).png
12.09KB -
img/IlluResidencePermitFront.(hash).png
12.08KB -
img/IlluDriverLicenseNumberHelp.(hash).png
11.93KB -
img/IlluDriverLicenseFront.(hash).png
11.85KB -
img/IlluDriverLicenseObtentionDateHelp.(hash)
.png
11.74KB -
img/IlluResidencePermitBack.(hash).png
11.01KB -
img/QRCode.(hash).png
9.77KB -
img/IlluNationalHealthInsuranceCardFront.(has
h).png
9.39KB -
img/IlluVehicleRegistration.(hash).png
8.92KB -
img/IlluNewNationalIdCardFront.(hash).png
8.65KB -
img/IlluOldNationalIdCardFront.(hash).png
7.86KB -
img/IlluDiploma.(hash).png
5.59KB -
img/IlluIBAN.(hash).png
3.81KB -
img/IlluCovidVaccineCertificate.(hash).png
2.96KB -
img/IlluInvoice.(hash).png
2.33KB -
img/IlluWorkContract.(hash).png
2.24KB -
img/marker-icon.(hash).png
1.45KB -
img/layers-2x.(hash).png
1.25KB -
img/layers.(hash).png
719B -
app-mespapiers.(hash).min.css
568B -
img/appstore.(hash).png
362B -
img/playstore.(hash).png
328B -

Total files change +11.01KB +0.16%

Groups updated (1)
Status Path Size Limits
**/*.js
6.69MB (+11.01KB +0.16%) -
Unchanged groups (2)
Status Path Size Limits
img/.
401.43KB -
**/*.css
38.35KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

`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
`cozy-device-helper` has been upgraded to `3.1.0` in order to retrieve
the Offline mode support

Related PR: cozy/cozy-libs#2562
`cozy-harvest-lib` has been upgraded to `30.0.1` in order to retrieve a
fix on accounts fetching that provide support for Offline mode

Related PR: cozy/cozy-libs#2585
`cozy-viewer` has been upgraded to `2.0.0` in order to retrieve changes
on how files are downloaded in order to handle Offline mode

Related PR: cozy/cozy-libs#2581
@Ldoppea Ldoppea force-pushed the feat/offline branch 2 times, most recently from b21c693 to 5999252 Compare September 24, 2024 16:28
`cozy-bar` has been upgraded to `15.0.1` in order to retrieve a fix
related to Offline mode

Related PR: cozy/cozy-bar#852
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
Previous query was not compatible with CozyPouchLink
In cozy/cozy-client#1518 we implemented a new `downloadFile()` that
allow to download files as before in a browser, but will download files
through cozy-intent when hosted in the Flagship app

This commit will replace the old way to download files with the new one
using `downloadFile()`
When offline, the PouchDB result does not contain a `referenced_by`
attribute if no relationship exists on the document. So we want to
optional chain this attribute to prevent any exception thrown

Related Commit: cozy/cozy-ui@e3eeb6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant