From f5c6ea8fabd614df8ff434a171fb7fbd8d550207 Mon Sep 17 00:00:00 2001 From: Soapbox Bot Date: Tue, 10 Jan 2023 15:51:07 +0000 Subject: [PATCH 1/3] Update dependency react-virtuoso to v4 --- package.json | 2 +- yarn.lock | 23 ++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 83bc62cee..7e7dce010 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "react-swipeable-views": "^0.14.0", "react-textarea-autosize": "^8.3.4", "react-toggle": "^4.1.2", - "react-virtuoso": "^3.1.3", + "react-virtuoso": "^4.0.0", "redux": "^4.1.1", "redux-immutable": "^4.0.0", "redux-thunk": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index e8ce0a2b8..c24d7a21a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3177,18 +3177,6 @@ "@typescript-eslint/types" "5.15.0" eslint-visitor-keys "^3.0.0" -"@virtuoso.dev/react-urx@^0.2.12": - version "0.2.13" - resolved "https://registry.yarnpkg.com/@virtuoso.dev/react-urx/-/react-urx-0.2.13.tgz#e2cfc42d259d2a002695e7517d34cb97b64ee9c4" - integrity sha512-MY0ugBDjFb5Xt8v2HY7MKcRGqw/3gTpMlLXId2EwQvYJoC8sP7nnXjAxcBtTB50KTZhO0SbzsFimaZ7pSdApwA== - dependencies: - "@virtuoso.dev/urx" "^0.2.13" - -"@virtuoso.dev/urx@^0.2.12", "@virtuoso.dev/urx@^0.2.13": - version "0.2.13" - resolved "https://registry.yarnpkg.com/@virtuoso.dev/urx/-/urx-0.2.13.tgz#a65e7e8d923cb03397ac876bfdd45c7f71c8edf1" - integrity sha512-iirJNv92A1ZWxoOHHDYW/1KPoi83939o83iUBQHIim0i3tMeSKEh+bxhJdTHQ86Mr4uXx9xGUTq69cp52ZP8Xw== - "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -9895,13 +9883,10 @@ react-transition-group@^2.2.1: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -react-virtuoso@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-3.1.3.tgz#db811ff6fdd4749cfe9348f6d0b1333a348e65c4" - integrity sha512-sc4WICEZkyT+XdVc7gA/61UT43ZnMSX0ugh+xBG2cX+EDWs31wP1dSKQ2HSQ0YFLhZXRJ+Jqndqa8MTu4NE4CQ== - dependencies: - "@virtuoso.dev/react-urx" "^0.2.12" - "@virtuoso.dev/urx" "^0.2.12" +react-virtuoso@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-4.0.3.tgz#0dc8b10978095852d985b064157639b9fb9d9b1e" + integrity sha512-tyqt8FBWxO+smve/kUgJbhCI2MEOvH2hHgFYPKWBMA2cJmV+cHIDDh1BL/6w4pg/dcCdlHCNVwi6aiztPxWttw== react@^18.0.0: version "18.2.0" From 14299ce62a6c399668be40846a0d75a33052b3f9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 10:36:28 -0600 Subject: [PATCH 2/3] ScrollableList: update Virtuoso component types for v4 --- app/soapbox/components/scrollable-list.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/soapbox/components/scrollable-list.tsx b/app/soapbox/components/scrollable-list.tsx index 86e40570e..fae4b0f40 100644 --- a/app/soapbox/components/scrollable-list.tsx +++ b/app/soapbox/components/scrollable-list.tsx @@ -24,13 +24,13 @@ type SavedScrollPosition = { // NOTE: It's crucial to space lists with **padding** instead of margin! // Pass an `itemClassName` like `pb-3`, NOT a `space-y-3` className // https://virtuoso.dev/troubleshooting#list-does-not-scroll-to-the-bottom--items-jump-around -const Item: Components['Item'] = ({ context, ...rest }) => ( +const Item: Components['Item'] = ({ context, ...rest }) => (
); /** Custom Virtuoso List component for the outer container. */ // Ensure the className winds up here -const List: Components['List'] = React.forwardRef((props, ref) => { +const List: Components['List'] = React.forwardRef((props, ref) => { const { context, ...rest } = props; return
; }); From 5666121e2d7e8840cdd5a43326c526f8f74fc08d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 10:56:21 -0600 Subject: [PATCH 3/3] Increase timeout for intermittently failing test --- app/soapbox/features/ui/__tests__/index.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/soapbox/features/ui/__tests__/index.test.tsx b/app/soapbox/features/ui/__tests__/index.test.tsx index 1d3164f77..9f04f5fb8 100644 --- a/app/soapbox/features/ui/__tests__/index.test.tsx +++ b/app/soapbox/features/ui/__tests__/index.test.tsx @@ -48,6 +48,8 @@ describe('', () => { await waitFor(() => { expect(screen.getByTestId('cta-banner')).toHaveTextContent('Sign up now to discuss'); + }, { + timeout: 2000, }); }); });