Skip to content
Open
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
14 changes: 3 additions & 11 deletions apps/mobile/src/components/ui/GlassSurface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ interface GlassSurfaceProps extends ViewProps {
readonly ref?: Ref<ViewInstance>;
readonly children: ReactNode;
readonly glassEffectStyle?: "clear" | "regular" | "none";
// null leaves UIKit's material untinted instead of applying the theme tint.
readonly tintColor?: ColorValue | null;
readonly tintColorClassName?: string;
readonly chrome?: "default" | "none";
Expand All @@ -49,7 +48,7 @@ export function GlassSurface({
const { themeAppearance } = useAppearancePreferences();
const isDarkMode = themeAppearance === "dark";
const supportsGlass = Platform.OS === "ios" && isGlassEffectAPIAvailable();
const hasShadow = chrome !== "none" && Platform.OS !== "android";
const hasShadow = !supportsGlass && chrome !== "none" && Platform.OS !== "android";
const surfaceStyle: ViewStyle = {
borderRadius: MOBILE_SHAPE.glass,
overflow: "hidden",
Expand All @@ -65,17 +64,10 @@ export function GlassSurface({
<ThemedGlassView
{...props}
ref={ref}
className={cn(
chrome === "none"
? "border-0 border-transparent bg-transparent"
: "border border-border bg-glass-surface",
className,
)}
className={cn("border-0 border-transparent bg-transparent", className)}
glassEffectStyle={glassEffectStyle}
tintColor={tintColor == null ? undefined : String(tintColor)}
tintColorClassName={
tintColorClassName ?? (tintColor === undefined ? "accent-glass-tint" : undefined)
}
tintColorClassName={tintColorClassName}
colorScheme={isDarkMode ? "dark" : "light"}
style={[surfaceStyle, style]}
>
Expand Down
3 changes: 1 addition & 2 deletions apps/mobile/src/features/keyboard/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ export function CommandPalette(props: {
/>
<GlassSurface
accessibilityViewIsModal
className="bg-sheet"
tintColorClassName="accent-sheet/20"
fallbackClassName="bg-sheet"
fallbackColor={themeVariables["--color-sheet"]}
style={{
width: Math.min(600, width - 32 - bounds.left - bounds.right),
Expand Down
10 changes: 1 addition & 9 deletions apps/mobile/src/features/threads/ComposerCommandPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ function PopoverSurface(props: { readonly children: React.ReactNode; readonly st
...props.style,
};

return (
<GlassSurface
glassEffectStyle="clear"
tintColorClassName="accent-glass-surface"
style={baseStyle}
>
{props.children}
</GlassSurface>
);
return <GlassSurface style={baseStyle}>{props.children}</GlassSurface>;
}

const SKILL_SOURCE_SYMBOL_BY_KIND: Record<ProviderSkillSourceKind, AppSymbolName> = {
Expand Down
Loading