-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix Lottie Animation Scaling and container width in Trips Empty State Illustration #61996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
93de73f
361cf0d
9d3c650
1235fcf
a2e5472
80b8d5b
cbfa944
dc70591
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React, {useMemo, useRef, useState} from 'react'; | ||
// eslint-disable-next-line no-restricted-imports | ||
import type {GestureResponderEvent, Text as RNText} from 'react-native'; | ||
import type {GestureResponderEvent, ImageStyle, Text as RNText, ViewStyle} from 'react-native'; | ||
import {Linking, View} from 'react-native'; | ||
import {useOnyx} from 'react-native-onyx'; | ||
import type {OnyxCollection} from 'react-native-onyx'; | ||
|
@@ -144,11 +144,11 @@ function EmptySearchView({type, hasResults}: EmptySearchViewProps) { | |
case CONST.SEARCH.DATA_TYPES.TRIP: | ||
return { | ||
headerMedia: LottieAnimations.TripsEmptyState, | ||
headerContentStyles: [StyleUtils.getWidthAndHeightStyle(375, 240), StyleUtils.getBackgroundColorStyle(theme.travelBG)], | ||
headerContentStyles: [styles.emptyStateFolderWebStyles, StyleUtils.getBackgroundColorStyle(theme.travelBG)], | ||
title: translate('travel.title'), | ||
titleStyles: {...styles.textAlignLeft}, | ||
children: tripViewChildren, | ||
lottieWebViewStyles: {backgroundColor: theme.travelBG, ...styles.emptyStateFolderWebStyles}, | ||
lottieWebViewStyles: {backgroundColor: theme.travelBG, ...styles.emptyStateFolderWebStyles, width: 335, height: 220}, | ||
}; | ||
case CONST.SEARCH.DATA_TYPES.EXPENSE: | ||
if (!hasResults) { | ||
|
@@ -272,7 +272,7 @@ function EmptySearchView({type, hasResults}: EmptySearchViewProps) { | |
titleStyles={content.titleStyles} | ||
subtitle={content.subtitle} | ||
buttons={content.buttons} | ||
headerContentStyles={[styles.h100, styles.w100, ...content.headerContentStyles]} | ||
headerContentStyles={[styles.h100, styles.w100, ...content.headerContentStyles] as Array<ViewStyle & ImageStyle>} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert this change , I don't think it's needed here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to either update the type of the Currently, its type is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the styling is consistent across other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other cases in the switch include For example, returning this value in the first case causes type errors that are handled correctly in the default case. return {
headerMedia: LottieAnimations.GenericEmptyState,
title: translate('search.searchResults.emptyResults.title'),
subtitle: translate('search.searchResults.emptyResults.subtitle'),
headerContentStyles: [styles.emptyStateFolderWebStyles, StyleUtils.getBackgroundColorStyle(theme.emptyFolderBG)],
lottieWebViewStyles: {backgroundColor: theme.emptyFolderBG, ...styles.emptyStateFolderWebStyles},
}; |
||
lottieWebViewStyles={content.lottieWebViewStyles} | ||
> | ||
{content.children} | ||
|
Uh oh!
There was an error while loading. Please reload this page.