diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index 0604092bf8b1..116f178868c1 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -29,21 +29,11 @@ jobs: BASELINE_BRANCH=${BASELINE_BRANCH:="main"} git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1 git switch "$BASELINE_BRANCH" - - # Clear node_modules and reinstall dependencies - rm -rf node_modules npm install --force - npx patch-package - npx reassure --baseline git switch --force --detach - git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours - - # Repeat clearing node_modules and reinstalling for the feature branch - rm -rf node_modules npm install --force - npx patch-package - npx reassure --branch - name: Validate output.json diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index 867f767448c2..39423ed156e1 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -11,6 +11,7 @@ import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultPro import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; +import useReportScrollManager from '@hooks/useReportScrollManager'; import useThemeStyles from '@hooks/useThemeStyles'; import compose from '@libs/compose'; import DateUtils from '@libs/DateUtils'; @@ -139,7 +140,6 @@ function ReportActionsList({ loadOlderChats, onLayout, isComposerFullSize, - reportScrollManager, listID, onContentSizeChange, }) { @@ -158,6 +158,7 @@ function ReportActionsList({ }; const platform = getPlatform(); const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID; + const reportScrollManager = useReportScrollManager(); const [currentUnreadMarker, setCurrentUnreadMarker] = useState(markerInit); const scrollingVerticalOffset = useRef(0); const readActionSkipped = useRef(false); @@ -260,6 +261,13 @@ function ReportActionsList({ }); }, [report.reportID]); + useEffect(() => { + InteractionManager.runAfterInteractions(() => { + reportScrollManager.scrollToBottom(); + }); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + useEffect(() => { // Why are we doing this, when in the cleanup of the useEffect we are already calling the unsubscribe function? // Answer: On web, when navigating to another report screen, the previous report screen doesn't get unmounted, diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index a9f4cb197b20..cbe74e3fd551 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -15,7 +15,6 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withW import useCopySelectionHelper from '@hooks/useCopySelectionHelper'; import useInitialValue from '@hooks/useInitialValue'; import usePrevious from '@hooks/usePrevious'; -import useReportScrollManager from '@hooks/useReportScrollManager'; import useWindowDimensions from '@hooks/useWindowDimensions'; import compose from '@libs/compose'; import getIsReportFullyVisible from '@libs/getIsReportFullyVisible'; @@ -173,7 +172,6 @@ const useHandleList = (linkedID, messageArray, fetchFn, route, isLoading) => { function ReportActionsView({reportActions: allReportActions, fetchReport, ...props}) { useCopySelectionHelper(); const reactionListRef = useContext(ReactionListContext); - const reportScrollManager = useReportScrollManager(); const route = useRoute(); const {reportActionID} = getReportActionID(route); const didLayout = useRef(false); @@ -239,10 +237,6 @@ function ReportActionsView({reportActions: allReportActions, fetchReport, ...pro return; } openReportIfNecessary(); - - InteractionManager.runAfterInteractions(() => { - reportScrollManager.scrollToBottom(); - }); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -391,7 +385,6 @@ function ReportActionsView({reportActions: allReportActions, fetchReport, ...pro isLoadingInitialReportActions={props.isLoadingInitialReportActions} isLoadingOlderReportActions={props.isLoadingOlderReportActions} isLoadingNewerReportActions={props.isLoadingNewerReportActions} - reportScrollManager={reportScrollManager} policy={props.policy} listID={listID} onContentSizeChange={onContentSizeChange}