Skip to content
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

[Fix]: Foreground and Background of report header don't match with report view loading state #40534

Merged
merged 3 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ type CurrentUserPersonalDetailsSkeletonViewProps = {

/** The size of the avatar */
avatarSize?: ValueOf<typeof CONST.AVATAR_SIZE>;

/** Background color of the skeleton view */
backgroundColor?: string;

/** Foreground color of the skeleton view */
foregroundColor?: string;
};

function CurrentUserPersonalDetailsSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.LARGE, backgroundColor, foregroundColor}: CurrentUserPersonalDetailsSkeletonViewProps) {
function CurrentUserPersonalDetailsSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.LARGE}: CurrentUserPersonalDetailsSkeletonViewProps) {
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand All @@ -37,8 +31,8 @@ function CurrentUserPersonalDetailsSkeletonView({shouldAnimate = true, avatarSiz
<View style={styles.avatarSectionWrapperSkeleton}>
<SkeletonViewContentLoader
animate={shouldAnimate}
backgroundColor={backgroundColor ?? theme.highlightBG}
foregroundColor={foregroundColor ?? theme.border}
backgroundColor={theme.skeletonLHNIn}
foregroundColor={theme.skeletonLHNOut}
height={avatarPlaceholderSize + spaceBetweenAvatarAndHeadline + headlineSize + spaceBetweenHeadlineAndLabel + labelSize}
>
<Circle
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportHeaderSkeletonView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function ReportHeaderSkeletonView({shouldAnimate = true, onBackButtonPress = ()
animate={shouldAnimate}
width={styles.w100.width}
height={height}
backgroundColor={theme.highlightBG}
foregroundColor={theme.border}
backgroundColor={theme.skeletonLHNIn}
foregroundColor={theme.skeletonLHNOut}
>
<Circle
cx="20"
Expand Down
Loading