@upstep/react-native 0.6.0 → 0.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstep/react-native",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Upstep feedback SDK for React Native",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -16,11 +16,13 @@
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=18",
19
- "react-native": ">=0.73"
19
+ "react-native": ">=0.73",
20
+ "react-native-safe-area-context": ">=4"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@types/react": "^19.0.7",
23
24
  "@types/react-native": "^0.73.0",
25
+ "react-native-safe-area-context": "^5.8.0",
24
26
  "typescript": "^5.7.3"
25
27
  },
26
28
  "keywords": [
@@ -12,8 +12,9 @@ import {
12
12
  ActivityIndicator,
13
13
  useColorScheme,
14
14
  Platform,
15
- SafeAreaView,
15
+ Linking,
16
16
  } from "react-native";
17
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
17
18
  import type { Comment, Feedback, FeedbackType, FeedbackWithComments } from "@upstep/types";
18
19
  import { useUpstep } from "./FeedbackContext";
19
20
 
@@ -65,6 +66,7 @@ export function FeedbackSheet() {
65
66
  const p = isDark ? DARK : LIGHT;
66
67
 
67
68
  const [nav, setNav] = useState<Nav>({ screen: "list" });
69
+ const insets = useSafeAreaInsets();
68
70
 
69
71
  // Refresh list every time the modal opens
70
72
  useEffect(() => {
@@ -165,8 +167,19 @@ export function FeedbackSheet() {
165
167
  )}
166
168
  </ScrollView>
167
169
 
168
- {/* Safe area spacer */}
169
- <SafeAreaView />
170
+ {/* Branding + safe-area bottom padding in one strip */}
171
+ <TouchableOpacity
172
+ onPress={() => Linking.openURL("https://upstep.dev")}
173
+ activeOpacity={0.6}
174
+ style={[
175
+ styles.poweredBy,
176
+ { borderTopColor: p.border, paddingBottom: insets.bottom + 10, backgroundColor: p.bg },
177
+ ]}
178
+ >
179
+ <Text style={[styles.poweredByText, { color: p.textFaint }]}>
180
+ Powered by <Text style={{ fontWeight: "700" }}>Upstep.dev</Text>
181
+ </Text>
182
+ </TouchableOpacity>
170
183
  </View>
171
184
  </KeyboardAvoidingView>
172
185
  </Modal>
@@ -239,12 +252,12 @@ function FeedCard({
239
252
  styles.voteBox,
240
253
  {
241
254
  borderColor: voted ? accent : p.border,
242
- backgroundColor: voted ? accent + "1a" : p.bgSoft,
255
+ backgroundColor: voted ? accent : p.bgSoft,
243
256
  },
244
257
  ]}
245
258
  >
246
- <Text style={[styles.voteArrow, { color: accent }]}>▲</Text>
247
- <Text style={[styles.voteCount, { color: p.text }]}>{item.upvotes}</Text>
259
+ <Text style={[styles.voteArrow, { color: voted ? "#fff" : accent }]}>▲</Text>
260
+ <Text style={[styles.voteCount, { color: voted ? "#fff" : p.text }]}>{item.upvotes}</Text>
248
261
  </TouchableOpacity>
249
262
 
250
263
  <View style={styles.cardBody}>
@@ -547,9 +560,9 @@ const styles = StyleSheet.create({
547
560
  backgroundColor: "rgba(0,0,0,0.45)",
548
561
  },
549
562
 
550
- // Sheet container
563
+ // Sheet container — fixed height so it's always fully open regardless of content
551
564
  sheet: {
552
- maxHeight: "92%",
565
+ height: "92%",
553
566
  borderTopLeftRadius: 24,
554
567
  borderTopRightRadius: 24,
555
568
  overflow: "hidden",
@@ -580,8 +593,8 @@ const styles = StyleSheet.create({
580
593
  newBtn: { borderRadius: 20, paddingHorizontal: 14, paddingVertical: 7 },
581
594
  newBtnText: { color: "#fff", fontSize: 13, fontWeight: "700" },
582
595
 
583
- // Scroll
584
- scroll: { flexGrow: 0 },
596
+ // Scroll — flex: 1 fills all remaining space after the fixed header
597
+ scroll: { flex: 1 },
585
598
  scrollContent: { flexGrow: 1, padding: 16, paddingBottom: 32 },
586
599
 
587
600
  // List
@@ -663,6 +676,14 @@ const styles = StyleSheet.create({
663
676
  successTitle: { fontSize: 20, fontWeight: "700", textAlign: "center", marginBottom: 6 },
664
677
  successSub: { fontSize: 14, textAlign: "center" },
665
678
 
679
+ // Branding
680
+ poweredBy: {
681
+ alignItems: "center",
682
+ paddingVertical: 10,
683
+ borderTopWidth: StyleSheet.hairlineWidth,
684
+ },
685
+ poweredByText: { fontSize: 11 },
686
+
666
687
  // Shared badges
667
688
  badge: { paddingHorizontal: 7, paddingVertical: 3, borderRadius: 6 },
668
689
  badgeText: { fontSize: 10, fontWeight: "700", letterSpacing: 0.2 },