Skip to content

Commit 1bc3fd9

Browse files
committed
feat: enhance bug reporting functionality
- Added new screens for managing bug reporting types, disclaimer text, invocation events, options, and session profiler. - Updated `ListTile` component to support subtitle truncation. - Integrated new bug reporting state management features into navigation. - Refactored `BugReportingScreen` to streamline state handling and improve UI interactions.
1 parent ed929e3 commit 1bc3fd9

10 files changed

+576
-209
lines changed

examples/default/src/components/ListTile.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface ListTileProps extends PropsWithChildren {
77
subtitle?: string;
88
onPress?: () => void;
99
testID?: string;
10+
truncateSubtitle?: boolean;
1011
}
1112

1213
export const ListTile: React.FC<ListTileProps> = ({
@@ -15,6 +16,7 @@ export const ListTile: React.FC<ListTileProps> = ({
1516
onPress,
1617
children,
1718
testID,
19+
truncateSubtitle = false,
1820
}) => {
1921
return (
2022
<Pressable
@@ -32,7 +34,11 @@ export const ListTile: React.FC<ListTileProps> = ({
3234
<VStack space={2}>
3335
<Text>{title}</Text>
3436
{subtitle && (
35-
<Text fontSize="xs" color="coolGray.500">
37+
<Text
38+
fontSize="xs"
39+
color="coolGray.500"
40+
numberOfLines={truncateSubtitle ? 1 : undefined}
41+
ellipsizeMode={truncateSubtitle ? 'tail' : undefined}>
3642
{subtitle}
3743
</Text>
3844
)}

examples/default/src/navigation/HomeStack.tsx

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ import {
77
BugReportingStateScreen,
88
type BugReportingStateScreenProp,
99
} from '../screens/bug-reporting/BugReportingStateScreen';
10+
import {
11+
ExtendedBugReportStateScreen,
12+
type ExtendedBugReportStateScreenProp,
13+
} from '../screens/bug-reporting/ExtendedBugReportStateScreen';
14+
import {
15+
BugReportingTypesScreen,
16+
type BugReportingTypesScreenProp,
17+
} from '../screens/bug-reporting/BugReportingTypesScreen';
18+
import {
19+
DisclaimerTextScreen,
20+
type DisclaimerTextScreenProp,
21+
} from '../screens/bug-reporting/DisclaimerTextScreen';
22+
import {
23+
InvocationOptionsScreen,
24+
type InvocationOptionsScreenProp,
25+
} from '../screens/bug-reporting/InvocationOptionsScreen';
1026
import { CrashReportingScreen } from '../screens/CrashReportingScreen';
1127
import { FeatureRequestsScreen } from '../screens/FeatureRequestsScreen';
1228
import { HomeScreen } from '../screens/HomeScreen';
@@ -35,11 +51,28 @@ import { HttpScreen } from '../screens/apm/HttpScreen';
3551
import { WebViewsScreen } from '../screens/apm/webViews/WebViewsScreen';
3652
import { FullWebViewsScreen } from '../screens/apm/webViews/FullWebViewsScreen';
3753
import { PartialWebViewsScreen } from '../screens/apm/webViews/PartialWebViewsScreen';
54+
import {
55+
InvocationEventsScreen,
56+
type InvocationEventsScreenProp,
57+
} from '../screens/bug-reporting/InvocationEventsScreen';
58+
import {
59+
SessionProfilerScreen,
60+
type SessionProfilerScreenProp,
61+
} from '../screens/bug-reporting/SessionProfilerScreen';
3862

3963
export type HomeStackParamList = {
4064
Home: undefined;
65+
66+
// Bug Reporting //
4167
BugReporting: undefined;
4268
BugReportingState: BugReportingStateScreenProp;
69+
ExtendedBugReportState: ExtendedBugReportStateScreenProp;
70+
BugReportingTypes: BugReportingTypesScreenProp;
71+
DisclaimerText: DisclaimerTextScreenProp;
72+
InvocationEvents: InvocationEventsScreenProp;
73+
SessionProfiler: SessionProfilerScreenProp;
74+
InvocationOptions: InvocationOptionsScreenProp;
75+
4376
CrashReporting: undefined;
4477
FeatureRequests: undefined;
4578
Replies: undefined;
@@ -74,6 +107,8 @@ export const HomeStackNavigator: React.FC = () => {
74107
return (
75108
<HomeStack.Navigator>
76109
<HomeStack.Screen name="Home" component={HomeScreen} />
110+
111+
{/* Bug Reporting */}
77112
<HomeStack.Screen
78113
name="BugReporting"
79114
component={BugReportingScreen}
@@ -84,6 +119,37 @@ export const HomeStackNavigator: React.FC = () => {
84119
component={BugReportingStateScreen}
85120
options={{ title: 'Bug Reporting State' }}
86121
/>
122+
<HomeStack.Screen
123+
name="ExtendedBugReportState"
124+
component={ExtendedBugReportStateScreen}
125+
options={{ title: 'Extended Bug Report State' }}
126+
/>
127+
<HomeStack.Screen
128+
name="BugReportingTypes"
129+
component={BugReportingTypesScreen}
130+
options={{ title: 'Bug Reporting Types' }}
131+
/>
132+
<HomeStack.Screen
133+
name="DisclaimerText"
134+
component={DisclaimerTextScreen}
135+
options={{ title: 'Disclaimer Text' }}
136+
/>
137+
<HomeStack.Screen
138+
name="InvocationEvents"
139+
component={InvocationEventsScreen}
140+
options={{ title: 'Invocation Events' }}
141+
/>
142+
<HomeStack.Screen
143+
name="SessionProfiler"
144+
component={SessionProfilerScreen}
145+
options={{ title: 'Session Profiler' }}
146+
/>
147+
<HomeStack.Screen
148+
name="InvocationOptions"
149+
component={InvocationOptionsScreen}
150+
options={{ title: 'Invocation Options' }}
151+
/>
152+
87153
<HomeStack.Screen
88154
name="CrashReporting"
89155
component={CrashReportingScreen}

0 commit comments

Comments
 (0)