Skip to content
TypeScript

fix(mobile): refine Git action toast glass styling (#8399)

Julius Marminge850e4582e4c8
diff --git a/apps/mobile/src/features/threads/GitActionProgressOverlay.tsx b/apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
index 8aeadc95cb6..fafde23f73b 100644
--- a/apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
+++ b/apps/mobile/src/features/threads/GitActionProgressOverlay.tsx
@@ -8,6 +8,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
import { AppText as Text } from "../../components/AppText";
import { APP_BAR_HEIGHT } from "../../lib/layoutMetrics";
+import { themeColorWithAlpha } from "../../lib/mobileTheme";
import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
import { useThemeColor } from "../../lib/useThemeColor";
import type { GitActionProgress } from "../../state/use-vcs-action-state";
@@ -68,10 +69,13 @@ export function GitActionProgressOverlay(props: {
function OverlayContent(props: { readonly progress: GitActionProgress }) {
const { progress } = props;
const iconColor = useThemeColor("--color-icon");
- const glassBorder = useThemeColor("--color-header-border");
- const glassTint = useThemeColor("--color-glass-tint");
+ const glassSurface = useThemeColor("--color-glass-surface");
+ const foreground = useThemeColor("--color-foreground");
+ const shadowColor = useThemeColor("--color-primary-shadow");
const { themeAppearance } = useAppearancePreferences();
const isDarkMode = themeAppearance === "dark";
+ const glassTint = themeColorWithAlpha(String(glassSurface), isDarkMode ? 0.48 : 0.38);
+ const glassBorder = themeColorWithAlpha(String(foreground), isDarkMode ? 0.18 : 0.12);
const content = (
<>
<OverlayIcon phase={progress.phase} iconColor={iconColor} />
@@ -100,12 +104,13 @@ function OverlayContent(props: { readonly progress: GitActionProgress }) {
<Animated.View
layout={OVERLAY_LAYOUT_TRANSITION}
style={{
- backgroundColor: glassTint,
- borderColor: glassBorder,
borderCurve: "continuous",
borderRadius: 26,
- borderWidth: StyleSheet.hairlineWidth,
- overflow: "hidden",
+ elevation: 12,
+ shadowColor,
+ shadowOffset: { width: 0, height: 8 },
+ shadowOpacity: isDarkMode ? 0.42 : 0.2,
+ shadowRadius: 18,
}}
>
<AnimatedLiquidGlassView
@@ -113,9 +118,12 @@ function OverlayContent(props: { readonly progress: GitActionProgress }) {
effect="regular"
interactive
layout={OVERLAY_LAYOUT_TRANSITION}
+ tintColor={glassTint}
style={{
+ borderColor: glassBorder,
borderCurve: "continuous",
borderRadius: 26,
+ borderWidth: StyleSheet.hairlineWidth,
overflow: "hidden",
}}
>