Skip to content

Commit ae2d9a4

Browse files
committed
fix(mobile): remove ambiguous activity tab counts
1 parent f16b8ab commit ae2d9a4

3 files changed

Lines changed: 3 additions & 14 deletions

File tree

‎apps/mobile/src/components/ui/Tabs.tsx‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export interface TabsProps<Value extends string> {
1515
readonly options: readonly {
1616
readonly value: Value;
1717
readonly label: string;
18-
readonly count?: number;
1918
}[];
2019
readonly selected: Value;
2120
readonly onSelect: (value: Value) => void;
@@ -58,7 +57,7 @@ export function Tabs<Value extends string>(props: TabsProps<Value>) {
5857
<Pressable
5958
key={option.value}
6059
accessibilityRole="tab"
61-
accessibilityLabel={option.count ? `${option.label}, ${option.count}` : option.label}
60+
accessibilityLabel={option.label}
6261
accessibilityState={{ selected }}
6362
onPress={() => props.onSelect(option.value)}
6463
onLayout={({ nativeEvent: { layout } }) =>
@@ -80,11 +79,6 @@ export function Tabs<Value extends string>(props: TabsProps<Value>) {
8079
>
8180
{option.label}
8281
</AppText>
83-
{option.count ? (
84-
<AppText textRole="label" className="font-t3-medium text-foreground-muted">
85-
{option.count}
86-
</AppText>
87-
) : null}
8882
</Pressable>
8983
);
9084
})}

‎apps/mobile/src/features/development/ComponentCatalogScreen.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function ComponentCatalogScreen() {
9494
options={[
9595
{ value: "controls", label: "Controls" },
9696
{ value: "forms", label: "Forms" },
97-
{ value: "feedback", label: "Feedback", count: 3 },
97+
{ value: "feedback", label: "Feedback" },
9898
]}
9999
selected={page}
100100
onSelect={setPage}

‎apps/mobile/src/features/pull-requests/PullRequestRouteScreen.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ function usePullRequestActivityRows(params: PullRequestParams, filter: ActivityF
171171
})();
172172
return {
173173
rows,
174-
count: result.data ? result.data.commentCount + result.data.reviewThreads.length : undefined,
175174
hiddenCount: filtered?.hiddenCount ?? 0,
176175
pending: result.isPending && !result.data,
177176
error: result.error,
@@ -845,11 +844,7 @@ export function PullRequestRouteScreen({ route }: StaticScreenProps<PullRequestP
845844
...(guidesEnabled
846845
? [{ value: "guide" as const, label: "Guide" }]
847846
: []),
848-
{
849-
value: "activity",
850-
label: "Activity",
851-
count: activityContent.count,
852-
},
847+
{ value: "activity", label: "Activity" },
853848
]}
854849
selected={section}
855850
onSelect={selectSection}

0 commit comments

Comments
 (0)