Skip to content

Commit a99a5fe

Browse files
authored
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
2 parents 4fabee6 + ef8193d commit a99a5fe

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
@@ -30,7 +30,6 @@ import {getAll, rollbackOngoingRequest, save} from './PersistedRequests';
3030
import {createDraftInitialWorkspace, createWorkspace, generatePolicyID} from './Policy/Policy';
3131
import {resolveDuplicationConflictAction} from './RequestConflictUtils';
3232
import {isAnonymousUser} from './Session';
33-
import {triggerSidePane} from './SidePane';
3433
import Timing from './Timing';
3534

3635
type PolicyParamsForOpenOrReconnect = {
@@ -196,7 +195,6 @@ function setLocale(locale: Locale) {
196195

197196
function setLocaleAndNavigate(locale: Locale) {
198197
setLocale(locale);
199-
triggerSidePane(false, {shouldUpdateNarrowLayout: true});
200198
Navigation.goBack();
201199
}
202200

0 commit comments

Comments
 (0)