Skip to content

Commit bb6f96a

Browse files
francoislOSBotify
authored andcommitted
Merge pull request #57831 from software-mansion-labs/fix/scroll-reports-screen
[CP Staging] Fix: Scroll Issue on Reports Page, side pane appearing after language change (cherry picked from commit a99a5fe) (CP triggered by francoisl)
1 parent f85cb16 commit bb6f96a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/hooks/useSidePane.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function useSidePane() {
2727
const {windowWidth} = useWindowDimensions();
2828

2929
const [sidePane] = useOnyx(ONYXKEYS.NVP_SIDE_PANE);
30-
const isPaneHidden = isSidePaneHidden(sidePane, isExtraLargeScreenWidth);
30+
const [language] = useOnyx(ONYXKEYS.NVP_PREFERRED_LOCALE);
31+
const isPaneHidden = isSidePaneHidden(sidePane, isExtraLargeScreenWidth) || language !== CONST.LOCALES.EN;
3132

3233
const sidePaneWidth = shouldUseNarrowLayout ? windowWidth : variables.sideBarWidth;
3334
const shouldApplySidePaneOffset = isExtraLargeScreenWidth && !isPaneHidden;

src/libs/Navigation/AppNavigator/useRootNavigatorScreenOptions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ const useRootNavigatorScreenOptions = () => {
8181
animation: Animations.NONE,
8282
web: {
8383
cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true}),
84-
cardStyle: {
85-
...StyleUtils.getNavigationModalCardStyle(),
86-
},
84+
cardStyle: StyleUtils.getNavigationModalCardStyle(),
8785
},
8886
},
8987
fullScreen: {
9088
...commonScreenOptions,
9189
// We need to turn off animation for the full screen to avoid delay when closing screens.
9290
animation: Animations.NONE,
9391
web: {
92+
cardStyle: {
93+
height: '100%',
94+
},
9495
cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePane: true}),
9596
},
9697
},

src/libs/actions/App.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {getAll, rollbackOngoingRequest, save} from './PersistedRequests';
3131
import {createDraftInitialWorkspace, createWorkspace, generatePolicyID} from './Policy/Policy';
3232
import {resolveDuplicationConflictAction} from './RequestConflictUtils';
3333
import {isAnonymousUser} from './Session';
34-
import {triggerSidePane} from './SidePane';
3534
import Timing from './Timing';
3635

3736
type PolicyParamsForOpenOrReconnect = {
@@ -197,7 +196,6 @@ function setLocale(locale: Locale) {
197196

198197
function setLocaleAndNavigate(locale: Locale) {
199198
setLocale(locale);
200-
triggerSidePane(false, {shouldUpdateNarrowLayout: true});
201199
Navigation.goBack();
202200
}
203201

0 commit comments

Comments
 (0)