From 285f161e68a812c0689e65c371426e2c02b1d3b9 Mon Sep 17 00:00:00 2001
From: Beto <43630417+betomoedano@users.noreply.github.com>
Date: Sat, 3 Jan 2026 11:54:37 -0600
Subject: [PATCH] refactor(companion): event type details screen improvements
(#26415)
* refactor(companion): move EventTypeDetail component to a new file and update routing
* refactor(companion): format code for better readability in TabLayout and EventTypeDetail components
* refactor(companion): improve code formatting and readability in EventTypeDetail component
* refactor(companion): enhance code readability and formatting in EventTypeDetail component
* refactor(companion): improve code formatting and readability in EventTypeDetail component
* refactor(companion): enhance code formatting and readability in EventTypeDetail component
* refactor(companion): improve code formatting and readability in TabLayout component
---
.../app/(tabs)/(event-types)/_layout.tsx | 3 +-
.../(event-types)}/event-type-detail.tsx | 253 +++++++-----------
companion/app/(tabs)/_layout.tsx | 1 +
3 files changed, 104 insertions(+), 153 deletions(-)
rename companion/app/{ => (tabs)/(event-types)}/event-type-detail.tsx (93%)
diff --git a/companion/app/(tabs)/(event-types)/_layout.tsx b/companion/app/(tabs)/(event-types)/_layout.tsx
index 710077f404..43cb7019c7 100644
--- a/companion/app/(tabs)/(event-types)/_layout.tsx
+++ b/companion/app/(tabs)/(event-types)/_layout.tsx
@@ -3,7 +3,8 @@ import { Stack } from "expo-router";
export default function EventTypesLayout() {
return (
-
+
+
);
}
diff --git a/companion/app/event-type-detail.tsx b/companion/app/(tabs)/(event-types)/event-type-detail.tsx
similarity index 93%
rename from companion/app/event-type-detail.tsx
rename to companion/app/(tabs)/(event-types)/event-type-detail.tsx
index bbfec5e25e..bc7dcc6c76 100644
--- a/companion/app/event-type-detail.tsx
+++ b/companion/app/(tabs)/(event-types)/event-type-detail.tsx
@@ -1,8 +1,7 @@
import { Ionicons } from "@expo/vector-icons";
import * as Clipboard from "expo-clipboard";
-import { GlassView, isLiquidGlassAvailable } from "expo-glass-effect";
import { Stack, useLocalSearchParams, useRouter } from "expo-router";
-import { useCallback, useEffect, useState } from "react";
+import { Activity, useCallback, useEffect, useState } from "react";
import {
Alert,
Animated,
@@ -39,6 +38,7 @@ import {
validateLocationItem,
} from "@/utils/locationHelpers";
import { safeLogError } from "@/utils/safeLogger";
+import { isLiquidGlassAvailable } from "expo-glass-effect";
// Type definitions for extended EventType fields not in the base type
interface EventTypeExtended {
@@ -1141,20 +1141,44 @@ export default function EventTypeDetail() {
headerRight:
Platform.OS === "android" || Platform.OS === "web" ? renderHeaderRight : undefined,
headerShown: Platform.OS !== "ios",
+ headerTransparent: Platform.select({
+ ios: true,
+ }),
}}
/>
{Platform.OS === "ios" && (
-
-
- router.back()}>
-
-
-
-
- {headerTitle}
-
+
+
+
+ {activeTab.charAt(0).toUpperCase() + activeTab.slice(1)}
+
+ {tabs.map((tab) => (
+ setActiveTab(tab.id)}
+ >
+ {tab.label}
+
+ ))}
+
- {/* Tabs */}
- {isLiquidGlassAvailable() ? (
-
-
- {tabs.map((tab) => (
- setActiveTab(tab.id)}
- >
-
-
-
- {tab.label}
-
-
-
- ))}
-
-
- ) : (
-
-
- {tabs.map((tab) => (
- setActiveTab(tab.id)}
- >
-
-
-
- {tab.label}
-
-
-
- ))}
-
-
- )}
-
- {/* Content */}
+
+
+
+ {tabs.map((tab) => (
+ setActiveTab(tab.id)}
+ >
+
+
+
+ {tab.label}
+
+
+
+ ))}
+
+
+
+
{activeTab === "basics" ? (
) : null}
-
- {/* Bottom Action Bar */}
-
-
-
- Hidden
+
+
+ Hidden
-
-
-
-
-
-
+
+ Preview
+
+
-
-
-
-
-
+
+ Copy Link
+
+
-
-
-
-
-
-
+
+ Delete
+
+
-
+
>
);
diff --git a/companion/app/(tabs)/_layout.tsx b/companion/app/(tabs)/_layout.tsx
index 0a2f65aaff..f13bbf38f7 100644
--- a/companion/app/(tabs)/_layout.tsx
+++ b/companion/app/(tabs)/_layout.tsx
@@ -15,6 +15,7 @@ export default function TabLayout() {
default: { color: "#8E8E93", fontSize: 8.5 }, // Gray text when unselected
selected: { color: "#000000", fontSize: 10 }, // Black text when selected
}}
+ disableTransparentOnScrollEdge={true}
>