Skip to content

Commit 0002c66

Browse files
authored
Merge pull request #56314 from nkdengineer/fix/55842
fix loading indicator when the app is loading
2 parents ad7462d + 5ddd049 commit 0002c66

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

src/components/Navigation/TopBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function TopBar({breadcrumbLabel, activeWorkspaceID, shouldDisplaySearch = true,
4242
const displaySearch = !isAnonymousUser && shouldDisplaySearch;
4343

4444
return (
45-
<View style={styles.w100}>
45+
<View style={[styles.w100, styles.zIndex10]}>
4646
<View
4747
style={[styles.flexRow, styles.gap4, styles.mh5, styles.mv5, styles.alignItemsCenter, styles.justifyContentBetween]}
4848
dataSet={{dragArea: true}}

src/pages/Search/SearchPageNarrow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function SearchPageNarrow({queryJSON, policyID, searchName, shouldGroupByReports
7272
const currentOffset = contentOffset.y;
7373
const isScrollingDown = currentOffset > scrollOffset.get();
7474
const distanceScrolled = currentOffset - scrollOffset.get();
75+
7576
if (isScrollingDown && contentOffset.y > TOO_CLOSE_TO_TOP_DISTANCE) {
7677
topBarOffset.set(clamp(topBarOffset.get() - distanceScrolled, variables.minimalTopBarOffset, StyleUtils.searchHeaderDefaultOffset));
7778
} else if (!isScrollingDown && distanceScrolled < 0 && contentOffset.y + layoutMeasurement.height < contentSize.height - TOO_CLOSE_TO_BOTTOM_DISTANCE) {

src/pages/home/sidebar/SidebarLinks.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import useLocalize from '@hooks/useLocalize';
99
import useResponsiveLayout from '@hooks/useResponsiveLayout';
1010
import useStyleUtils from '@hooks/useStyleUtils';
1111
import useThemeStyles from '@hooks/useThemeStyles';
12+
import {confirmReadyToOpenApp, setSidebarLoaded} from '@libs/actions/App';
1213
import Navigation from '@libs/Navigation/Navigation';
1314
import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu';
14-
import * as App from '@userActions/App';
1515
import CONST from '@src/CONST';
1616
import ROUTES from '@src/ROUTES';
1717
import type {Report} from '@src/types/onyx';
@@ -44,7 +44,7 @@ function SidebarLinks({insets, optionListItems, isLoading, priorityMode = CONST.
4444
const {shouldUseNarrowLayout} = useResponsiveLayout();
4545

4646
useEffect(() => {
47-
App.confirmReadyToOpenApp();
47+
confirmReadyToOpenApp();
4848
}, []);
4949

5050
useEffect(() => {
@@ -91,10 +91,10 @@ function SidebarLinks({insets, optionListItems, isLoading, priorityMode = CONST.
9191
onSelectRow={showReportPage}
9292
shouldDisableFocusOptions={shouldUseNarrowLayout}
9393
optionMode={viewMode}
94-
onFirstItemRendered={App.setSidebarLoaded}
94+
onFirstItemRendered={setSidebarLoaded}
9595
/>
9696
{!!isLoading && optionListItems?.length === 0 && (
97-
<View style={[StyleSheet.absoluteFillObject, styles.appBG]}>
97+
<View style={[StyleSheet.absoluteFillObject, styles.appBG, styles.mt3]}>
9898
<OptionsListSkeletonView shouldAnimate />
9999
</View>
100100
)}

src/styles/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3757,7 +3757,7 @@ const styles = (theme: ThemeColors) =>
37573757
},
37583758

37593759
narrowSearchHeaderStyle: {
3760-
paddingTop: 1,
3760+
paddingTop: 12,
37613761
backgroundColor: theme.appBG,
37623762
flex: 1,
37633763
},
@@ -5429,7 +5429,8 @@ const styles = (theme: ThemeColors) =>
54295429
width: '100%',
54305430
backgroundColor: theme.transparent,
54315431
overflow: 'hidden',
5432-
marginBottom: -1,
5432+
position: 'absolute',
5433+
bottom: -1,
54335434
},
54345435

54355436
progressBar: {

src/styles/variables.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ export default {
276276
inlineImagePreviewMinSize: 64,
277277
inlineImagePreviewMaxSize: 148,
278278

279-
minimalTopBarOffset: -106,
279+
minimalTopBarOffset: -124,
280280
searchHeaderDefaultOffset: 0,
281-
searchListContentMarginTop: 116,
281+
searchListContentMarginTop: 124,
282282
searchTopBarZIndex: 9,
283283
searchTopBarHeight: 52,
284284
searchRouterInputMargin: 52,

0 commit comments

Comments
 (0)