Skip to content

Commit ea0d6ca

Browse files
paultranvanrezk2ll
authored andcommitted
feat: Always render dataproxy children
Previously, the rendering of `DataProxyProvider` children were conditioned by the initialization of the dataproxy. It was because we wanted to avoid timing issues, were the App started to use the DataProxy before it was actually ready. See https://github.com/cozy/cozy-libs/commit/ bdb1670 We later made it less strict, because if anything make the dataproxy not initialized, nothing is displayed on the app side with no logs, making it hard to debug for the developer. See #2801 However, we still met situations with no rendering, because the dataproxy was not available at all: - Public sharing: cozy/cozy-drive#3439 - Unsupported shared workers: cozy/cozy-web-data-proxy#36 So now, we always render children, and expect the `DataProxyLink` to handle queries made on non-ready DataProxy by queuing them: cozy/cozy-client#1622
1 parent 61c2e41 commit ea0d6ca

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

packages/cozy-dataproxy-lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"babel-plugin-module-resolver": "^4.0.0",
2222
"babel-plugin-tsconfig-paths": "^1.0.3",
2323
"babel-preset-cozy-app": "^2.8.1",
24-
"cozy-client": "^54.0.0",
24+
"cozy-client": "^60.2.0",
2525
"cozy-device-helper": "^4.0.0",
2626
"cozy-flags": "^4.7.0",
2727
"cozy-intent": "^2.30.0",
@@ -51,7 +51,7 @@
5151
".": "./dist/index.js"
5252
},
5353
"peerDependencies": {
54-
"cozy-client": ">=54.0.0",
54+
"cozy-client": ">=60.2.0",
5555
"cozy-device-helper": ">=3.7.1",
5656
"cozy-flags": ">=4.6.1",
5757
"cozy-intent": ">=2.26.0",

packages/cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export const DataProxyProvider = React.memo(({ children }) => {
185185

186186
return (
187187
<DataProxyContext.Provider value={dataProxy || {}}>
188-
{(dataProxyServicesAvailable === false || dataProxy) && children}
188+
{children}
189189
{iframeUrl ? (
190190
<iframe
191191
id="DataProxy"

yarn.lock

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16663,6 +16663,45 @@ __metadata:
1666316663
languageName: node
1666416664
linkType: hard
1666516665

16666+
"cozy-client@npm:^60.2.0":
16667+
version: 60.3.0
16668+
resolution: "cozy-client@npm:60.3.0"
16669+
dependencies:
16670+
"@cozy/minilog": "npm:1.0.0"
16671+
"@fastify/deepmerge": "npm:^2.0.2"
16672+
"@types/jest": "npm:^26.0.20"
16673+
"@types/lodash": "npm:^4.14.170"
16674+
btoa: "npm:^1.2.1"
16675+
cozy-stack-client: "npm:^60.1.0"
16676+
date-fns: "npm:2.29.3"
16677+
fast-deep-equal: "npm:^3.1.3"
16678+
json-stable-stringify: "npm:^1.0.1"
16679+
lodash: "npm:^4.17.13"
16680+
microee: "npm:^0.0.6"
16681+
node-fetch: "npm:^2.6.1"
16682+
node-polyglot: "npm:2.4.2"
16683+
open: "npm:7.4.2"
16684+
prop-types: "npm:^15.6.2"
16685+
react-redux: "npm:^7.2.0"
16686+
redux: "npm:3 || 4"
16687+
redux-thunk: "npm:^2.3.0"
16688+
server-destroy: "npm:^1.0.1"
16689+
sift: "npm:^6.0.0"
16690+
url-search-params-polyfill: "npm:^8.0.0"
16691+
peerDependencies:
16692+
cozy-device-helper: ">=2.1.0"
16693+
cozy-flags: ">2.8.6"
16694+
cozy-intent: ">=2.23.0"
16695+
cozy-logger: ">1.7.0"
16696+
react: ^16.7.0
16697+
react-native: ~0.63.5
16698+
react-native-google-play-integrity: ^1.1.0
16699+
react-native-inappbrowser-reborn: ^3.5.1
16700+
react-native-ios11-devicecheck: ^0.0.3
16701+
checksum: 10c0/77fe471ecf767cdc8041e59fd3de1566c3d8c9cf8e1a7e8c97e8502c62138cc0bffb88d5f75f2dc6d84076e1d5296254db5c6f1b3c5249158a7b0f1d940557a3
16702+
languageName: node
16703+
linkType: hard
16704+
1666616705
"cozy-client@npm:^60.5.0":
1666716706
version: 60.5.0
1666816707
resolution: "cozy-client@npm:60.5.0"
@@ -16714,7 +16753,7 @@ __metadata:
1671416753
babel-plugin-tsconfig-paths: "npm:^1.0.3"
1671516754
babel-preset-cozy-app: "npm:^2.8.1"
1671616755
comlink: "npm:4.4.1"
16717-
cozy-client: "npm:^54.0.0"
16756+
cozy-client: "npm:^60.2.0"
1671816757
cozy-device-helper: "npm:^4.0.0"
1671916758
cozy-flags: "npm:^4.7.0"
1672016759
cozy-intent: "npm:^2.30.0"
@@ -16730,7 +16769,7 @@ __metadata:
1673016769
react-router-dom: "npm:6.14.2"
1673116770
typescript: "npm:5.5.2"
1673216771
peerDependencies:
16733-
cozy-client: ">=54.0.0"
16772+
cozy-client: ">=60.2.0"
1673416773
cozy-device-helper: ">=3.7.1"
1673516774
cozy-flags: ">=4.6.1"
1673616775
cozy-intent: ">=2.26.0"

0 commit comments

Comments
 (0)