From e1c547fe22f486a628be69cb8c1525ed9565747b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Sat, 14 Dec 2024 21:21:40 +0000 Subject: [PATCH 1/5] Enable skippable collection member IDs in Onyx --- src/CONST.ts | 6 +++++- src/setup/index.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index d8724d9c72b2..4187d14d5e7e 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -16,6 +16,8 @@ import type PlaidBankAccount from './types/onyx/PlaidBankAccount'; const EMPTY_ARRAY = Object.freeze([]); const EMPTY_OBJECT = Object.freeze({}); +const DEFAULT_NUMBER_ID = 0; + const CLOUDFRONT_DOMAIN = 'cloudfront.net'; const CLOUDFRONT_URL = `https://d2k5nsl2zxldvw.${CLOUDFRONT_DOMAIN}`; const ACTIVE_EXPENSIFY_URL = Url.addTrailingForwardSlash(Config?.NEW_EXPENSIFY_URL ?? 'https://new.expensify.com'); @@ -884,7 +886,7 @@ const CONST = { CLOUDFRONT_URL, EMPTY_ARRAY, EMPTY_OBJECT, - DEFAULT_NUMBER_ID: 0, + DEFAULT_NUMBER_ID, USE_EXPENSIFY_URL, EXPENSIFY_URL, GOOGLE_MEET_URL_ANDROID: 'https://meet.google.com', @@ -6442,6 +6444,8 @@ const CONST = { QUICK_ACTION_BUTTON: 'quickActionButton', WORKSAPCE_CHAT_CREATE: 'workspaceChatCreate', }, + + SKIPPABLE_COLLECTION_MEMBER_IDS: [String(DEFAULT_NUMBER_ID), '-1', 'undefined', 'null'] as string[], } as const; type Country = keyof typeof CONST.ALL_COUNTRIES; diff --git a/src/setup/index.ts b/src/setup/index.ts index 3cfc0e55eae8..6d319871f4f5 100644 --- a/src/setup/index.ts +++ b/src/setup/index.ts @@ -42,6 +42,7 @@ export default function () { // Always open the home route on app startup for native platforms by clearing the lastVisitedPath [ONYXKEYS.LAST_VISITED_PATH]: initializeLastVisitedPath(), }, + skippableCollectionMemberIDs: CONST.SKIPPABLE_COLLECTION_MEMBER_IDS, }); Device.setDeviceID(); From 67164e9fe97cd03e0cd83c2b39be738bfd5792b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Mon, 13 Jan 2025 22:05:39 +0000 Subject: [PATCH 2/5] Add NaN value --- src/CONST.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index 93fae3dccb4d..37094e89a192 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -6493,7 +6493,7 @@ const CONST = { GLOBAL_CREATE_TOOLTIP: 'globalCreateTooltip', }, SMART_BANNER_HEIGHT: 152, - SKIPPABLE_COLLECTION_MEMBER_IDS: [String(DEFAULT_NUMBER_ID), '-1', 'undefined', 'null'] as string[], + SKIPPABLE_COLLECTION_MEMBER_IDS: [String(DEFAULT_NUMBER_ID), '-1', 'undefined', 'null', 'NaN'] as string[], } as const; type Country = keyof typeof CONST.ALL_COUNTRIES; From 2b5037b8b86199f1af32088209d82db0835426ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Thu, 16 Jan 2025 18:30:20 +0000 Subject: [PATCH 3/5] Fix wrong merge --- src/CONST.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index b5581af9b323..9e8e9b17810a 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -869,7 +869,6 @@ const CONST = { EMPTY_ARRAY, EMPTY_OBJECT, DEFAULT_NUMBER_ID, - EMPTY_STRING: '', USE_EXPENSIFY_URL, EXPENSIFY_URL, GOOGLE_MEET_URL_ANDROID: 'https://meet.google.com', From 1508a4f52b832df48b8e1c29d8f54ca0155689fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Fri, 24 Jan 2025 11:38:31 +0000 Subject: [PATCH 4/5] Bump Onyx to 2.0.91 --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82299434a3b1..168704306a0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,7 +98,7 @@ "react-native-launch-arguments": "^4.0.2", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "2.0.89", + "react-native-onyx": "2.0.91", "react-native-pager-view": "6.5.1", "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", @@ -32319,9 +32319,9 @@ } }, "node_modules/react-native-onyx": { - "version": "2.0.89", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-2.0.89.tgz", - "integrity": "sha512-JzXjas0UNnYqTH4XD2Qfs64kBJBvHQ7HIIglieL1+Gto7eANyFRUpr0uRM3BlONinSPD/1xWZIurYAJtHuM5dg==", + "version": "2.0.91", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-2.0.91.tgz", + "integrity": "sha512-tmRnU6+1DxL+Vbs+7fZWWx2plSDrgs/s6cR2XRamjScpqkeXaaTeajZUNpMImIHZQI5eSazRySNxO5zKnzCL1w==", "license": "MIT", "dependencies": { "ascii-table": "0.0.9", diff --git a/package.json b/package.json index 393f670098fa..fa07a00b2e8e 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,8 @@ }, "dependencies": { "@dotlottie/react-player": "^1.6.3", - "@expensify/react-native-live-markdown": "0.1.210", "@expensify/react-native-background-task": "file:./modules/background-task", + "@expensify/react-native-live-markdown": "0.1.210", "@expo/metro-runtime": "^4.0.0", "@firebase/app": "^0.10.10", "@firebase/performance": "^0.6.8", @@ -163,7 +163,7 @@ "react-native-launch-arguments": "^4.0.2", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "2.0.89", + "react-native-onyx": "2.0.91", "react-native-pager-view": "6.5.1", "react-native-pdf": "6.7.3", "react-native-performance": "^5.1.0", From 0c4dac96a944121b585394cf272fb902f21c26ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Fri, 24 Jan 2025 11:42:26 +0000 Subject: [PATCH 5/5] Fix imports --- src/setup/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/setup/index.ts b/src/setup/index.ts index 6d319871f4f5..bf0e1c3fd2b9 100644 --- a/src/setup/index.ts +++ b/src/setup/index.ts @@ -1,7 +1,7 @@ import {I18nManager} from 'react-native'; import Onyx from 'react-native-onyx'; import intlPolyfill from '@libs/IntlPolyfill'; -import * as Device from '@userActions/Device'; +import {setDeviceID} from '@userActions/Device'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import addUtilsToWindow from './addUtilsToWindow'; @@ -45,7 +45,7 @@ export default function () { skippableCollectionMemberIDs: CONST.SKIPPABLE_COLLECTION_MEMBER_IDS, }); - Device.setDeviceID(); + setDeviceID(); // Force app layout to work left to right because our design does not currently support devices using this mode I18nManager.allowRTL(false);