Bluesky app fork with some witchin' additions 💫

Merge branch 'main' of https://github.com/bluesky-social/social-app

+91 -52
+7
src/components/PostControls/PostMenu/PostMenuItems.tsx
··· 266 267 const onHidePost = () => { 268 hidePost({uri: postUri}) 269 } 270 271 const hideInPWI = !!postAuthor.labels?.find( ··· 346 replyUri: postUri, 347 action, 348 }) 349 Toast.show( 350 isHide 351 ? _(msg`Reply was successfully hidden`)
··· 266 267 const onHidePost = () => { 268 hidePost({uri: postUri}) 269 + logEvent('thread:click:hideReplyForMe', {}) 270 } 271 272 const hideInPWI = !!postAuthor.labels?.find( ··· 347 replyUri: postUri, 348 action, 349 }) 350 + 351 + // Log metric only when hiding (not when showing) 352 + if (isHide) { 353 + logEvent('thread:click:hideReplyForEveryone', {}) 354 + } 355 + 356 Toast.show( 357 isHide 358 ? _(msg`Reply was successfully hidden`)
-9
src/components/SubtleHover.tsx
··· 39 /> 40 ) 41 42 - if (hover) { 43 - console.log({ 44 - isWeb, 45 - web, 46 - isNative, 47 - native, 48 - }) 49 - } 50 - 51 if (isWeb && web) { 52 return isTouchDevice ? null : el 53 } else if (isNative && native) {
··· 39 /> 40 ) 41 42 if (isWeb && web) { 43 return isTouchDevice ? null : el 44 } else if (isNative && native) {
+13 -14
src/locale/locales/en/messages.po
··· 832 msgid "Adult Content" 833 msgstr "" 834 835 - #: src/screens/Moderation/index.tsx:429 836 msgid "Adult content can only be enabled via the Web at <0>bsky.app</0>." 837 msgstr "" 838 ··· 845 msgid "Adult Content labels" 846 msgstr "" 847 848 - #: src/screens/Moderation/index.tsx:479 849 msgid "Advanced" 850 msgstr "" 851 ··· 2101 msgid "Confirm delete account" 2102 msgstr "" 2103 2104 - #: src/screens/Moderation/index.tsx:354 2105 msgid "Confirm your age:" 2106 msgstr "" 2107 2108 - #: src/screens/Moderation/index.tsx:345 2109 msgid "Confirm your birthdate" 2110 msgstr "" 2111 ··· 2172 msgid "Content Blocked" 2173 msgstr "" 2174 2175 - #: src/screens/Moderation/index.tsx:341 2176 - #: src/screens/Moderation/index.tsx:375 2177 msgid "Content filters" 2178 msgstr "" 2179 ··· 2744 #: src/lib/moderation/useLabelBehaviorDescription.ts:71 2745 #: src/screens/Messages/Settings.tsx:144 2746 #: src/screens/Messages/Settings.tsx:147 2747 - #: src/screens/Moderation/index.tsx:419 2748 msgid "Disabled" 2749 msgstr "" 2750 ··· 3114 msgid "Enable {0} only" 3115 msgstr "" 3116 3117 - #: src/screens/Moderation/index.tsx:406 3118 msgid "Enable adult content" 3119 msgstr "" 3120 ··· 3161 3162 #: src/screens/Messages/Settings.tsx:135 3163 #: src/screens/Messages/Settings.tsx:138 3164 - #: src/screens/Moderation/index.tsx:417 3165 msgid "Enabled" 3166 msgstr "" 3167 ··· 7867 msgid "Set app icon to {0}" 7868 msgstr "" 7869 7870 - #: src/screens/Moderation/index.tsx:357 7871 msgid "Set birthdate" 7872 msgstr "" 7873 ··· 8716 msgid "The birthdate you've entered means you are under 18 years old. Certain content and features may be unavailable to you." 8717 msgstr "" 8718 8719 - #: src/screens/Moderation/index.tsx:432 8720 msgid "The Bluesky web application" 8721 msgstr "" 8722 ··· 9200 msgid "Today" 9201 msgstr "" 9202 9203 - #: src/screens/Moderation/index.tsx:409 9204 msgid "Toggle to enable or disable adult content" 9205 msgstr "" 9206 ··· 10084 msgid "We were unable to load your birth date preferences. Please try again." 10085 msgstr "" 10086 10087 - #: src/screens/Moderation/index.tsx:489 10088 msgid "We were unable to load your configured labelers at this time." 10089 msgstr "" 10090 ··· 10604 msgid "You must be following at least seven other people to generate a starter pack." 10605 msgstr "" 10606 10607 - #: src/screens/Moderation/index.tsx:379 10608 msgid "You must complete age assurance in order to access the settings below." 10609 msgstr "" 10610
··· 832 msgid "Adult Content" 833 msgstr "" 834 835 + #: src/screens/Moderation/index.tsx:418 836 msgid "Adult content can only be enabled via the Web at <0>bsky.app</0>." 837 msgstr "" 838 ··· 845 msgid "Adult Content labels" 846 msgstr "" 847 848 + #: src/screens/Moderation/index.tsx:468 849 msgid "Advanced" 850 msgstr "" 851 ··· 2101 msgid "Confirm delete account" 2102 msgstr "" 2103 2104 + #: src/screens/Moderation/index.tsx:356 2105 msgid "Confirm your age:" 2106 msgstr "" 2107 2108 + #: src/screens/Moderation/index.tsx:347 2109 msgid "Confirm your birthdate" 2110 msgstr "" 2111 ··· 2172 msgid "Content Blocked" 2173 msgstr "" 2174 2175 + #: src/screens/Moderation/index.tsx:340 2176 msgid "Content filters" 2177 msgstr "" 2178 ··· 2743 #: src/lib/moderation/useLabelBehaviorDescription.ts:71 2744 #: src/screens/Messages/Settings.tsx:144 2745 #: src/screens/Messages/Settings.tsx:147 2746 + #: src/screens/Moderation/index.tsx:408 2747 msgid "Disabled" 2748 msgstr "" 2749 ··· 3113 msgid "Enable {0} only" 3114 msgstr "" 3115 3116 + #: src/screens/Moderation/index.tsx:395 3117 msgid "Enable adult content" 3118 msgstr "" 3119 ··· 3160 3161 #: src/screens/Messages/Settings.tsx:135 3162 #: src/screens/Messages/Settings.tsx:138 3163 + #: src/screens/Moderation/index.tsx:406 3164 msgid "Enabled" 3165 msgstr "" 3166 ··· 7866 msgid "Set app icon to {0}" 7867 msgstr "" 7868 7869 + #: src/screens/Moderation/index.tsx:359 7870 msgid "Set birthdate" 7871 msgstr "" 7872 ··· 8715 msgid "The birthdate you've entered means you are under 18 years old. Certain content and features may be unavailable to you." 8716 msgstr "" 8717 8718 + #: src/screens/Moderation/index.tsx:421 8719 msgid "The Bluesky web application" 8720 msgstr "" 8721 ··· 9199 msgid "Today" 9200 msgstr "" 9201 9202 + #: src/screens/Moderation/index.tsx:398 9203 msgid "Toggle to enable or disable adult content" 9204 msgstr "" 9205 ··· 10083 msgid "We were unable to load your birth date preferences. Please try again." 10084 msgstr "" 10085 10086 + #: src/screens/Moderation/index.tsx:478 10087 msgid "We were unable to load your configured labelers at this time." 10088 msgstr "" 10089 ··· 10603 msgid "You must be following at least seven other people to generate a starter pack." 10604 msgstr "" 10605 10606 + #: src/screens/Moderation/index.tsx:368 10607 msgid "You must complete age assurance in order to access the settings below." 10608 msgstr "" 10609
+2
src/logger/metrics.ts
··· 481 'share:press:embed': {} 482 483 'thread:click:showOtherReplies': {} 484 'thread:preferences:load': { 485 [key: string]: any 486 }
··· 481 'share:press:embed': {} 482 483 'thread:click:showOtherReplies': {} 484 + 'thread:click:hideReplyForMe': {} 485 + 'thread:click:hideReplyForEveryone': {} 486 'thread:preferences:load': { 487 [key: string]: any 488 }
+53 -2
src/screens/Hashtag.tsx
··· 1 import React from 'react' 2 import {type ListRenderItemInfo, View} from 'react-native' 3 import {type AppBskyFeedDefs} from '@atproto/api' 4 - import {msg} from '@lingui/macro' 5 import {useLingui} from '@lingui/react' 6 import {useFocusEffect} from '@react-navigation/native' 7 import {type NativeStackScreenProps} from '@react-navigation/native-stack' ··· 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 import {enforceLen} from '#/lib/strings/helpers' 16 import {useSearchPostsQuery} from '#/state/queries/search-posts' 17 import {useSetMinimalShellMode} from '#/state/shell' 18 import {Pager} from '#/view/com/pager/Pager' 19 import {TabBar} from '#/view/com/pager/TabBar' 20 import {Post} from '#/view/com/post/Post' 21 import {List} from '#/view/com/util/List' 22 - import {atoms as a, web} from '#/alf' 23 import {Button, ButtonIcon} from '#/components/Button' 24 import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/components/icons/ArrowOutOfBox' 25 import * as Layout from '#/components/Layout' 26 import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' 27 28 const renderItem = ({item}: ListRenderItemInfo<AppBskyFeedDefs.PostView>) => { 29 return <Post post={item} /> ··· 161 const {_} = useLingui() 162 const initialNumToRender = useInitialNumToRender() 163 const [isPTR, setIsPTR] = React.useState(false) 164 165 const queryParam = React.useMemo(() => { 166 if (!author) return fullTag ··· 193 if (isFetchingNextPage || !hasNextPage || error) return 194 fetchNextPage() 195 }, [isFetchingNextPage, hasNextPage, error, fetchNextPage]) 196 197 return ( 198 <>
··· 1 import React from 'react' 2 import {type ListRenderItemInfo, View} from 'react-native' 3 import {type AppBskyFeedDefs} from '@atproto/api' 4 + import {msg, Trans} from '@lingui/macro' 5 import {useLingui} from '@lingui/react' 6 import {useFocusEffect} from '@react-navigation/native' 7 import {type NativeStackScreenProps} from '@react-navigation/native-stack' ··· 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 import {enforceLen} from '#/lib/strings/helpers' 16 import {useSearchPostsQuery} from '#/state/queries/search-posts' 17 + import {useSession} from '#/state/session' 18 import {useSetMinimalShellMode} from '#/state/shell' 19 + import {useLoggedOutViewControls} from '#/state/shell/logged-out' 20 + import {useCloseAllActiveElements} from '#/state/util' 21 import {Pager} from '#/view/com/pager/Pager' 22 import {TabBar} from '#/view/com/pager/TabBar' 23 import {Post} from '#/view/com/post/Post' 24 import {List} from '#/view/com/util/List' 25 + import {atoms as a, useTheme, web} from '#/alf' 26 import {Button, ButtonIcon} from '#/components/Button' 27 import {ArrowOutOfBoxModified_Stroke2_Corner2_Rounded as Share} from '#/components/icons/ArrowOutOfBox' 28 import * as Layout from '#/components/Layout' 29 + import {InlineLinkText} from '#/components/Link' 30 import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' 31 + import {SearchError} from '#/components/SearchError' 32 + import {Text} from '#/components/Typography' 33 34 const renderItem = ({item}: ListRenderItemInfo<AppBskyFeedDefs.PostView>) => { 35 return <Post post={item} /> ··· 167 const {_} = useLingui() 168 const initialNumToRender = useInitialNumToRender() 169 const [isPTR, setIsPTR] = React.useState(false) 170 + const t = useTheme() 171 + const {hasSession} = useSession() 172 173 const queryParam = React.useMemo(() => { 174 if (!author) return fullTag ··· 201 if (isFetchingNextPage || !hasNextPage || error) return 202 fetchNextPage() 203 }, [isFetchingNextPage, hasNextPage, error, fetchNextPage]) 204 + 205 + const closeAllActiveElements = useCloseAllActiveElements() 206 + const {requestSwitchToAccount} = useLoggedOutViewControls() 207 + 208 + const showSignIn = () => { 209 + closeAllActiveElements() 210 + requestSwitchToAccount({requestedAccount: 'none'}) 211 + } 212 + 213 + const showCreateAccount = () => { 214 + closeAllActiveElements() 215 + requestSwitchToAccount({requestedAccount: 'new'}) 216 + } 217 + 218 + if (!hasSession) { 219 + return ( 220 + <SearchError 221 + title={_(msg`Search is currently unavailable when logged out`)}> 222 + <Text style={[a.text_md, a.text_center, a.leading_snug]}> 223 + <Trans> 224 + <InlineLinkText 225 + label={_(msg`Sign in`)} 226 + to={'#'} 227 + onPress={showSignIn}> 228 + Sign in 229 + </InlineLinkText> 230 + <Text style={t.atoms.text_contrast_medium}> or </Text> 231 + <InlineLinkText 232 + label={_(msg`Create an account`)} 233 + to={'#'} 234 + onPress={showCreateAccount}> 235 + create an account 236 + </InlineLinkText> 237 + <Text> </Text> 238 + <Text style={t.atoms.text_contrast_medium}> 239 + to search for news, sports, politics, and everything else 240 + happening on Bluesky. 241 + </Text> 242 + </Trans> 243 + </Text> 244 + </SearchError> 245 + ) 246 + } 247 248 return ( 249 <>
+16 -27
src/screens/Moderation/index.tsx
··· 328 </Link> 329 </View> 330 331 - {declaredAge === undefined && ( 332 <> 333 - <Text 334 - style={[ 335 - a.pt_2xl, 336 - a.pb_md, 337 - a.text_md, 338 - a.font_semi_bold, 339 - t.atoms.text_contrast_high, 340 - ]}> 341 - <Trans>Content filters</Trans> 342 - </Text> 343 - 344 <Button 345 label={_(msg`Confirm your birthdate`)} 346 size="small" ··· 360 361 <BirthDateSettingsDialog control={birthdateDialogControl} /> 362 </> 363 - )} 364 - 365 - {!isDeclaredUnderage && ( 366 <> 367 - <Text 368 - style={[ 369 - a.pt_2xl, 370 - a.pb_md, 371 - a.text_md, 372 - a.font_semi_bold, 373 - t.atoms.text_contrast_high, 374 - ]}> 375 - <Trans>Content filters</Trans> 376 - </Text> 377 - 378 <AgeAssuranceAdmonition style={[a.pb_md]}> 379 <Trans> 380 You must complete age assurance in order to access the settings ··· 466 </View> 467 </View> 468 </> 469 - )} 470 471 <Text 472 style={[
··· 328 </Link> 329 </View> 330 331 + {(!isDeclaredUnderage || declaredAge === undefined) && ( 332 + <Text 333 + style={[ 334 + a.pt_2xl, 335 + a.pb_md, 336 + a.text_md, 337 + a.font_semi_bold, 338 + t.atoms.text_contrast_high, 339 + ]}> 340 + <Trans>Content filters</Trans> 341 + </Text> 342 + )} 343 + 344 + {declaredAge === undefined ? ( 345 <> 346 <Button 347 label={_(msg`Confirm your birthdate`)} 348 size="small" ··· 362 363 <BirthDateSettingsDialog control={birthdateDialogControl} /> 364 </> 365 + ) : !isDeclaredUnderage ? ( 366 <> 367 <AgeAssuranceAdmonition style={[a.pb_md]}> 368 <Trans> 369 You must complete age assurance in order to access the settings ··· 455 </View> 456 </View> 457 </> 458 + ) : null} 459 460 <Text 461 style={[