Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add debug feedContext label (#4598)

authored by

dan and committed by
GitHub
7db8dd89 707ea5bf

+30
+1
src/lib/statsig/gates.ts
··· 1 1 export type Gate = 2 2 // Keep this alphabetic please. 3 + | 'debug_show_feedcontext' 3 4 | 'native_pwi_disabled' 4 5 | 'request_notifications_permission_after_onboarding_v2' 5 6 | 'show_avi_follow_button'
+29
src/view/com/util/post-ctrls/PostCtrls.tsx
··· 6 6 View, 7 7 type ViewStyle, 8 8 } from 'react-native' 9 + import * as Clipboard from 'expo-clipboard' 9 10 import { 10 11 AppBskyFeedDefs, 11 12 AppBskyFeedPost, ··· 19 20 import {useHaptics} from '#/lib/haptics' 20 21 import {makeProfileLink} from '#/lib/routes/links' 21 22 import {shareUrl} from '#/lib/sharing' 23 + import {useGate} from '#/lib/statsig/statsig' 22 24 import {toShareUrl} from '#/lib/strings/url-helpers' 23 25 import {s} from '#/lib/styles' 24 26 import {Shadow} from '#/state/cache/types' ··· 41 43 import {PostDropdownBtn} from '../forms/PostDropdownBtn' 42 44 import {formatCount} from '../numeric/format' 43 45 import {Text} from '../text/Text' 46 + import * as Toast from '../Toast' 44 47 import {RepostButton} from './RepostButton' 45 48 46 49 let PostCtrls = ({ ··· 75 78 const loggedOutWarningPromptControl = useDialogControl() 76 79 const {sendInteraction} = useFeedFeedbackContext() 77 80 const playHaptic = useHaptics() 81 + const gate = useGate() 78 82 79 83 const shouldShowLoggedOutWarning = React.useMemo(() => { 80 84 return ( ··· 329 333 timestamp={post.indexedAt} 330 334 /> 331 335 </View> 336 + {gate('debug_show_feedcontext') && feedContext && ( 337 + <Pressable 338 + accessible={false} 339 + style={{ 340 + position: 'absolute', 341 + top: 0, 342 + bottom: 0, 343 + right: 0, 344 + display: 'flex', 345 + justifyContent: 'center', 346 + }} 347 + onPress={e => { 348 + e.stopPropagation() 349 + Clipboard.setStringAsync(feedContext) 350 + Toast.show(_(msg`Copied to clipboard`)) 351 + }}> 352 + <Text 353 + style={{ 354 + color: t.palette.contrast_400, 355 + fontSize: 7, 356 + }}> 357 + {feedContext} 358 + </Text> 359 + </Pressable> 360 + )} 332 361 </View> 333 362 ) 334 363 }