From d633227119f33363a9814608cc517d0519680266 Mon Sep 17 00:00:00 2001 From: reneshen0328 Date: Mon, 27 Oct 2025 11:24:31 -0700 Subject: [PATCH 1/2] fix(content-sharing): null sharingServiceProps --- package.json | 4 ++-- scripts/buildLocaleAssets.js | 3 +++ src/elements/content-sharing/hooks/useSharingService.ts | 6 +++--- .../content-sharing/stories/ContentSharing.stories.js | 2 +- yarn.lock | 8 ++++---- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 7f7a3b460c..b4a05d23b6 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "@box/metadata-view": "^0.59.0", "@box/react-virtualized": "^9.22.3-rc-box.10", "@box/types": "^0.2.1", - "@box/unified-share-modal": "^0.52.0", + "@box/unified-share-modal": "^1.5.1", "@box/user-selector": "^1.23.25", "@cfaester/enzyme-adapter-react-18": "^0.8.0", "@chromatic-com/storybook": "^4.0.1", @@ -310,7 +310,7 @@ "@box/metadata-view": "^0.59.0", "@box/react-virtualized": "^9.22.3-rc-box.10", "@box/types": "^0.2.1", - "@box/unified-share-modal": "^0.52.0", + "@box/unified-share-modal": "^1.5.1", "@box/user-selector": "^1.23.25", "@hapi/address": "^2.1.4", "@tanstack/react-virtual": "^3.13.12", diff --git a/scripts/buildLocaleAssets.js b/scripts/buildLocaleAssets.js index c0aff0c149..46576ed0bb 100644 --- a/scripts/buildLocaleAssets.js +++ b/scripts/buildLocaleAssets.js @@ -55,6 +55,9 @@ if (isMainThread) { const { locale, react } = workerData; parentPort.postMessage(`[${threadId}] Building ${locale} assets with react=${react}...`); + if (locale !== 'en-US') { + return; + } try { execSync(`time LANGUAGE=${locale} REACT=${react} yarn build:prod:dist`); } catch (error) { diff --git a/src/elements/content-sharing/hooks/useSharingService.ts b/src/elements/content-sharing/hooks/useSharingService.ts index 519b85c142..a518d3cc7c 100644 --- a/src/elements/content-sharing/hooks/useSharingService.ts +++ b/src/elements/content-sharing/hooks/useSharingService.ts @@ -50,10 +50,10 @@ export const useSharingService = ({ id: itemId, access: sharedLink.access, permissions: { - can_set_share_access: sharingServiceProps.can_set_share_access, - can_share: sharingServiceProps.can_share, + can_set_share_access: sharingServiceProps?.can_set_share_access, + can_share: sharingServiceProps?.can_share, }, - serverUrl: sharingServiceProps.serverUrl, + serverUrl: sharingServiceProps?.serverUrl, isDownloadAvailable: sharedLink.settings?.isDownloadAvailable ?? false, }; diff --git a/src/elements/content-sharing/stories/ContentSharing.stories.js b/src/elements/content-sharing/stories/ContentSharing.stories.js index 1ccba911af..748502303b 100644 --- a/src/elements/content-sharing/stories/ContentSharing.stories.js +++ b/src/elements/content-sharing/stories/ContentSharing.stories.js @@ -15,7 +15,7 @@ export const withCustomButton = { export const withContentSharingV2Enabled = { args: { - children: , + // children: , features: { ...global.FEATURE_FLAGS, contentSharingV2: true, diff --git a/yarn.lock b/yarn.lock index dff835d75b..966da1322a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1549,10 +1549,10 @@ resolved "https://registry.yarnpkg.com/@box/types/-/types-0.2.1.tgz#cd0a3915b2306e4cf581f6091b95f5d2db75ea60" integrity sha512-wd6nRR9QxBl7lYKJ/Hix0AKg1PNC3leZWOJ9Nt+d4j45WxCYBiCemZAtY2ekL5BITpVw8vlLmquzSpPhDTeO5A== -"@box/unified-share-modal@^0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-0.52.0.tgz#5ebfb1c9246789ce4650efc9b19283de0c492f71" - integrity sha512-85/xr47n9uCNwJ3nMq5AEGHJ6DOUrClh9ARbwaoJeR39x0sTjv0JGIBAmK4yM2rhPMGZO2jnnBcZ8wbZ+yVoHw== +"@box/unified-share-modal@^1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-1.5.1.tgz#48d5b4acc57f9987acc1d897d801248110787719" + integrity sha512-zNSxgJOSZBNH2YF1pi3SJ3+y3br3JxM5A1XGoY6KJXi+b3QcLoWwS8ZuCb6eKNvq1S9f7q7RxSpT4ENs+0BLzw== "@box/user-selector@^1.23.25": version "1.23.25" From 6198dc1f20fa7bdcb1dd70b432daa31dbca67dd2 Mon Sep 17 00:00:00 2001 From: reneshen0328 Date: Mon, 27 Oct 2025 11:59:18 -0700 Subject: [PATCH 2/2] fix: remove not needed code --- scripts/buildLocaleAssets.js | 3 --- src/elements/content-sharing/stories/ContentSharing.stories.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/buildLocaleAssets.js b/scripts/buildLocaleAssets.js index 46576ed0bb..c0aff0c149 100644 --- a/scripts/buildLocaleAssets.js +++ b/scripts/buildLocaleAssets.js @@ -55,9 +55,6 @@ if (isMainThread) { const { locale, react } = workerData; parentPort.postMessage(`[${threadId}] Building ${locale} assets with react=${react}...`); - if (locale !== 'en-US') { - return; - } try { execSync(`time LANGUAGE=${locale} REACT=${react} yarn build:prod:dist`); } catch (error) { diff --git a/src/elements/content-sharing/stories/ContentSharing.stories.js b/src/elements/content-sharing/stories/ContentSharing.stories.js index 748502303b..1ccba911af 100644 --- a/src/elements/content-sharing/stories/ContentSharing.stories.js +++ b/src/elements/content-sharing/stories/ContentSharing.stories.js @@ -15,7 +15,7 @@ export const withCustomButton = { export const withContentSharingV2Enabled = { args: { - // children: , + children: , features: { ...global.FEATURE_FLAGS, contentSharingV2: true,