cozy / cozy-banks

A Banks Aggregator on Cozy
https://cozy.io
GNU Affero General Public License v3.0
59 stars 26 forks source link

Feat: Get brands from registry instead json file only #2673

Closed Merkur39 closed 11 months ago

Merkur39 commented 11 months ago

Context: When a banking transaction can be linked to a konnector, the application offers to install the konnector to the user.

Correction(initial): The application must not offer konnectors for maintenance.

Originally, the only data source for retrieving information about konnectors was a JSON file (brands.json). This could quickly lead to issues if the file was not strictly maintained, for example, whether a connector is in maintenance or not.

The solution here is to query the registry to retrieve all konnectors, filter the relevant information for the app, merge it with the JSON file, and save it in localStorage. Since this information is not used only for React components, a Provider doesn't meet the requirements. The total information represents approximately 23KB.

The solution of using the localforage library (already used in the app) was tested and rejected. Transitioning to asynchronous operations would require a significant rethinking of many functional implementations. Given the performance gains, the cost is too high.

As a result, we are sticking with synchronous operation but with up-to-date information about the konnectors and reducing our reliance on Redux.

In the near future, we hope to completely eliminate the need for the JSON file, but currently, the manifest files of the konnectors lack some information (such as contact or health).

### 🐛 Bug Fixes

* No chips for Konnectors under maintenance

### 🔧 Tech

* Retrieving connectors via the registry in addition to the JSON file
bundlemon[bot] commented 11 months ago

BundleMon

Files updated (9) Status | Path | Size | Limits :------------: | ------------ | :------------: | :------------: :white_check_mark: | recurrence.js
| 1.06MB (+2.59KB +0.24%) | - :white_check_mark: | onOperationOrBillCreate.js
| 1.08MB (+2.46KB +0.22%) | - :white_check_mark: | konnectorAlerts.js
| 1.06MB (+2.18KB +0.2%) | - :white_check_mark: | budgetAlerts.js
| 1.04MB (+2.14KB +0.2%) | - :white_check_mark: | autogroups.js
| 464.46KB (+2.03KB +0.44%) | - :white_check_mark: | vendors.bundle.js
| 1.18MB (+1.82KB +0.15%) | - :white_check_mark: | linkMyselfToAccounts.js
| 464.08KB (+1.69KB +0.36%) | - :white_check_mark: | categorization.js
| 1.09MB (+1.45KB +0.13%) | - :white_check_mark: | main.bundle.js
| 208.65KB (+167B +0.08%) | -
Unchanged files (38) Status | Path | Size | Limits :------------: | ------------ | :------------: | :------------: :white_check_mark: | screenshots/fr/screenshot4.png
| 1.29MB | - :white_check_mark: | screenshots/en/screenshot4.png
| 1.28MB | - :white_check_mark: | screenshots/fr/screenshot5.png
| 1.17MB | - :white_check_mark: | screenshots/en/screenshot5.png
| 1.17MB | - :white_check_mark: | screenshots/fr/screenshot1.png
| 330.32KB | - :white_check_mark: | screenshots/en/screenshot1.png
| 311.39KB | - :white_check_mark: | screenshots/fr/screenshot2.png
| 264.27KB | - :white_check_mark: | screenshots/en/screenshot2.png
| 256.24KB | - :white_check_mark: | screenshots/fr/screenshot3.png
| 246.98KB | - :white_check_mark: | screenshots/en/screenshot3.png
| 243.76KB | - :white_check_mark: | img/veepee-info.43d778410d97b8e73b4eb07bb4631
d74.png
| 173.24KB | - :white_check_mark: | img/veepee-info@2x.e00642b6164d2b110ebd6a1443
9fcda5.png
| 167.13KB | - :white_check_mark: | img/ameli-side.7173251188c5fe0d8d54e265f8426a
89.png
| 115.29KB | - :white_check_mark: | cozy-bar.bundle.js
| 34.39KB | - :white_check_mark: | vendors-banks.(hash).(hash).min.css
| 31.64KB | - :white_check_mark: | img/veepee.9d3db3d18a5534582eba5b9fdbddb8bf.p
ng
| 25.01KB | - :white_check_mark: | img/transfer-error.81739cda73db9309b4f58bf975
ee3856.jpg
| 24.69KB | - :white_check_mark: | main-banks.(hash).min.css
| 16.18KB | - :white_check_mark: | img/transfer-done.952c792c91ee5a8b70e025e85bf
4938a.jpg
| 13.95KB | - :white_check_mark: | icon-banks.jpg
| 8.09KB | - :white_check_mark: | img/icon-banks.3b21dff3d03e7f0b319fb93b5c5417
84.jpg
| 8.09KB | - :white_check_mark: | img/search-illu.4536cb0962f2010e397bb96aeed5b
415.svg
| 4.48KB | - :white_check_mark: | img/timeline_desktop_fr.8a2f9796b9d34fdc21eec
489d2f16db1.svg
| 3.94KB | - :white_check_mark: | img/timeline_mobile_fr.e42a3b60dcefcdbae40e44
9c49c01d83.svg
| 3.83KB | - :white_check_mark: | img/timeline_mobile_en.0f4ace6755128e27a825e0
31b0480a71.svg
| 3.66KB | - :white_check_mark: | img/timeline_desktop_en.8ed0e7248216da5fb042e
30314036a39.svg
| 3.51KB | - :white_check_mark: | mesinfos/favicon-32x32.png
| 1.39KB | - :white_check_mark: | mesinfos/favicon.ico
| 1.19KB | - :white_check_mark: | mesinfos/favicon-16x16.png
| 1.11KB | - :white_check_mark: | index.html
| 1.07KB | - :white_check_mark: | img/NoAccount.5cd307dbe22ac700d2f570f2c33487e
3.svg
| 1021B | - :white_check_mark: | mesinfos/icon-bank.svg
| 645B | - :white_check_mark: | img/pie-demo.5d713502666ac766dddccd37e34b0089
.svg
| 449B | - :white_check_mark: | favicon-32x32.png
| 242B | - :white_check_mark: | public/safari-pinned-tab.svg
| 229B | - :white_check_mark: | favicon-16x16.png
| 216B | - :white_check_mark: | icon-banks.svg
| 191B | - :white_check_mark: | img/icon-banks.9c3bc95f679ee29ae4b2b3f9fda178
37.svg
| 191B | -

Total files change +16.53KB +0.11%

Final result: :white_check_mark:

View report in BundleMon website ➡️


Current branch size history | Target branch size history