@omercnet/paseo-pr-radar 3.0.1-next.299.1 → 3.0.1-next.300.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pr-radar.tsx +22 -4
- package/client/web.ts +10 -0
- package/package.json +1 -1
package/client/pr-radar.tsx
CHANGED
|
@@ -2,7 +2,15 @@ import { openExternalUrl, type PluginSurfaceProps, useRpc } from "@getpaseo/plug
|
|
|
2
2
|
import { copyText } from "@getpaseo/plugin/client/react-native";
|
|
3
3
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ActivityIndicator,
|
|
7
|
+
FlatList,
|
|
8
|
+
Pressable,
|
|
9
|
+
ScrollView,
|
|
10
|
+
Text,
|
|
11
|
+
TextInput,
|
|
12
|
+
View,
|
|
13
|
+
} from "react-native";
|
|
6
14
|
import { acknowledgeViewerScope } from "../shared/viewer-scope";
|
|
7
15
|
import {
|
|
8
16
|
agentActionFor,
|
|
@@ -25,6 +33,7 @@ import {
|
|
|
25
33
|
VIEWER_URL_LIMIT,
|
|
26
34
|
} from "./screen-state";
|
|
27
35
|
import { useRadar } from "./use-radar";
|
|
36
|
+
import { revealFocusedChip } from "./web";
|
|
28
37
|
|
|
29
38
|
const CLOCK_TICK_MS = 30_000;
|
|
30
39
|
|
|
@@ -335,7 +344,9 @@ export function PrRadar({
|
|
|
335
344
|
fontSize: 13,
|
|
336
345
|
fontWeight: "700" as const,
|
|
337
346
|
},
|
|
338
|
-
|
|
347
|
+
// Filter chips stay on one line and scroll sideways instead of wrapping.
|
|
348
|
+
chipScroller: { flexGrow: 0 },
|
|
349
|
+
chipRow: { flexDirection: "row" as const, gap: 7, paddingRight: 6 },
|
|
339
350
|
chip: {
|
|
340
351
|
minHeight: 32,
|
|
341
352
|
justifyContent: "center" as const,
|
|
@@ -687,7 +698,14 @@ export function PrRadar({
|
|
|
687
698
|
</View>
|
|
688
699
|
))}
|
|
689
700
|
</View>
|
|
690
|
-
<
|
|
701
|
+
<ScrollView
|
|
702
|
+
accessibilityRole="tablist"
|
|
703
|
+
horizontal
|
|
704
|
+
onFocus={revealFocusedChip}
|
|
705
|
+
showsHorizontalScrollIndicator={false}
|
|
706
|
+
style={styles.chipScroller}
|
|
707
|
+
contentContainerStyle={styles.chipRow}
|
|
708
|
+
>
|
|
691
709
|
<Pressable
|
|
692
710
|
accessibilityRole="tab"
|
|
693
711
|
accessibilityState={{
|
|
@@ -757,7 +775,7 @@ export function PrRadar({
|
|
|
757
775
|
</Text>
|
|
758
776
|
</Pressable>
|
|
759
777
|
))}
|
|
760
|
-
</
|
|
778
|
+
</ScrollView>
|
|
761
779
|
<TextInput
|
|
762
780
|
accessibilityLabel="Filter pull requests"
|
|
763
781
|
autoCapitalize="none"
|
package/client/web.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Platform, type ScrollViewProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
export const revealFocusedChip: NonNullable<ScrollViewProps["onFocus"]> = (event) => {
|
|
4
|
+
if (Platform.OS !== "web") return;
|
|
5
|
+
|
|
6
|
+
const target = event.target as unknown as {
|
|
7
|
+
scrollIntoView(options: { block: "nearest"; inline: "nearest" }): void;
|
|
8
|
+
};
|
|
9
|
+
target.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
10
|
+
};
|
package/package.json
CHANGED