Skip to content
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
6 changes: 3 additions & 3 deletions src/components/AgentPromotionalBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function AgentPromotionalBanner({title, subtitle, onDismiss, dismissSentryLabel,
return (
<Button
success
small
medium
text={ctaText}
onPress={onCtaPress}
sentryLabel={ctaSentryLabel}
Expand All @@ -97,8 +97,8 @@ function AgentPromotionalBanner({title, subtitle, onDismiss, dismissSentryLabel,
icon={illustrations.AiBot}
title={titleNode}
subtitle={subtitle}
subtitleStyle={[styles.mt1]}
style={[styles.borderRadiusComponentLarge, styles.gap4]}
subtitleStyle={[styles.mt1, styles.textLabel]}
style={[styles.borderRadiusComponentLarge]}
rightIcon={expensifyIcons.Close}
onRightIconPress={onDismiss}
rightIconAccessibilityLabel={translate('common.dismiss')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function BillingBanner({
return onRightIconPress && rightIconAccessibilityLabel ? (
<PressableWithoutFeedback
onPress={onRightIconPress}
style={[styles.touchableButtonImage]}
style={[styles.touchableButtonImage, styles.threeDotsMenuIconWidth]}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the dismiss hit target at 40px

When a BillingBanner right icon is pressable (e.g. the agent promo and retry-billing success dismiss buttons), adding threeDotsMenuIconWidth overrides touchableButtonImage's 40px width with componentSizeXSmall (20px at the default font scale). That shrinks the actual tappable area of the close button on touch devices, making the dismiss affordance much harder to hit; adjust the visual spacing without reducing the pressable width, or use hit slop to preserve the old target size.

Useful? React with 👍 / 👎.

role={CONST.ROLE.BUTTON}
accessibilityLabel={rightIconAccessibilityLabel}
sentryLabel={rightIconSentryLabel ?? CONST.SENTRY_LABEL.BILLING_BANNER.RIGHT_ICON}
Expand Down Expand Up @@ -108,6 +108,7 @@ function BillingBanner({
rightIconAccessibilityLabel,
rightIconSentryLabel,
styles.touchableButtonImage,
styles.threeDotsMenuIconWidth,
theme.danger,
theme.icon,
theme.success,
Expand Down
Loading