Bluesky app fork with some witchin' additions 💫

pronouns and wokeness

authored by aylac.top and committed by xan.lol a1874907 49e90f7b

verified
+84 -29
+1
src/components/Post/Embed/LazyQuoteEmbed.tsx
··· 21 21 type: 'post', 22 22 view, 23 23 }} 24 + showPronouns={true} 24 25 /> 25 26 ) : ( 26 27 <View
+2
src/components/Post/Embed/index.tsx
··· 312 312 style, 313 313 isWithinQuote: parentIsWithinQuote, 314 314 allowNestedQuotes: parentAllowNestedQuotes, 315 + showPronouns, 315 316 }: Omit<CommonProps, 'viewContext'> & { 316 317 embed: EmbedType<'post'> 317 318 viewContext?: QuoteEmbedViewContext ··· 398 399 author={quote.author} 399 400 moderation={moderation} 400 401 showAvatar 402 + showPronouns={showPronouns} 401 403 postHref={itemHref} 402 404 timestamp={quote.indexedAt} 403 405 />
+1
src/components/Post/Embed/types.ts
··· 18 18 viewContext?: PostEmbedViewContext 19 19 isWithinQuote?: boolean 20 20 allowNestedQuotes?: boolean 21 + showPronouns?: boolean 21 22 } 22 23 23 24 export type EmbedProps = CommonProps & {
+1
src/screens/Profile/Header/Handle.tsx
··· 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles' 7 + import {sanitizePronouns} from '#/lib/strings/pronouns' 7 8 import {type Shadow} from '#/state/cache/types' 8 9 import {useShowLinkInHandle} from '#/state/preferences/show-link-in-handle.tsx' 9 10 import {atoms as a, useTheme, web} from '#/alf'
+4 -1
src/state/shell/composer/index.tsx
··· 22 22 cid: string 23 23 text: string 24 24 langs?: string[] 25 - author: AppBskyActorDefs.ProfileViewBasic 25 + // remove this after updating atproto api package 26 + author: AppBskyActorDefs.ProfileViewBasic & { 27 + pronouns?: string 28 + } 26 29 embed?: AppBskyFeedDefs.PostView['embed'] 27 30 moderation?: ModerationDecision 28 31 }
+37 -16
src/view/com/composer/ComposerReplyTo.tsx
··· 12 12 13 13 import {sanitizeDisplayName} from '#/lib/strings/display-names' 14 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 + import {sanitizePronouns} from '#/lib/strings/pronouns' 15 16 import {type ComposerOptsPostRef} from '#/state/shell/composer' 16 17 import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar' 17 18 import {atoms as a, useTheme, web} from '#/alf' ··· 100 101 /> 101 102 <View style={[a.flex_1, a.pl_md, a.pr_sm, a.gap_2xs]}> 102 103 <View style={[a.flex_row, a.align_center, a.pr_xs]}> 103 - <Text 104 - style={[a.font_semi_bold, a.text_md, a.leading_snug, a.flex_shrink]} 105 - numberOfLines={1} 106 - emoji> 107 - {sanitizeDisplayName( 108 - replyTo.author.displayName || 109 - sanitizeHandle(replyTo.author.handle), 104 + <View style={[a.flex_row, a.align_center]}> 105 + <Text 106 + style={[ 107 + a.font_semi_bold, 108 + a.text_md, 109 + a.leading_snug, 110 + a.flex_shrink, 111 + ]} 112 + numberOfLines={1} 113 + emoji> 114 + {sanitizeDisplayName( 115 + replyTo.author.displayName || 116 + sanitizeHandle(replyTo.author.handle), 117 + )} 118 + </Text> 119 + {verification.showBadge && ( 120 + <View style={[a.pl_xs]}> 121 + <VerificationCheck 122 + width={14} 123 + verifier={verification.role === 'verifier'} 124 + /> 125 + </View> 110 126 )} 111 - </Text> 112 - {verification.showBadge && ( 113 - <View style={[a.pl_xs]}> 114 - <VerificationCheck 115 - width={14} 116 - verifier={verification.role === 'verifier'} 117 - /> 118 - </View> 127 + </View> 128 + {replyTo.author?.pronouns && ( 129 + <Text 130 + style={[ 131 + t.atoms.text_contrast_low, 132 + a.text_md, 133 + a.leading_snug, 134 + a.pl_xs, 135 + ]} 136 + numberOfLines={1} 137 + emoji> 138 + {sanitizePronouns(replyTo.author.pronouns, true)} 139 + </Text> 119 140 )} 120 141 </View> 121 142 <View style={[a.flex_row, a.gap_md]}> ··· 132 153 )} 133 154 </View> 134 155 {showFull && parsedQuoteEmbed && parsedQuoteEmbed.type === 'post' && ( 135 - <QuoteEmbed embed={parsedQuoteEmbed} /> 156 + <QuoteEmbed embed={parsedQuoteEmbed} showPronouns={true} /> 136 157 )} 137 158 </View> 138 159 </Pressable>
+38 -12
src/view/com/util/PostMeta.tsx
··· 11 11 import {NON_BREAKING_SPACE} from '#/lib/strings/constants' 12 12 import {sanitizeDisplayName} from '#/lib/strings/display-names' 13 13 import {sanitizeHandle} from '#/lib/strings/handles' 14 + import {sanitizePronouns} from '#/lib/strings/pronouns' 14 15 import {niceDate} from '#/lib/strings/time' 15 16 import {useProfileShadow} from '#/state/cache/profile-shadow' 16 17 import {precacheProfile} from '#/state/queries/profile' ··· 30 31 postHref: string 31 32 timestamp: string 32 33 showAvatar?: boolean 34 + showPronouns?: boolean 33 35 avatarSize?: number 34 36 onOpenAuthor?: () => void 35 37 style?: StyleProp<ViewStyle> ··· 42 44 const author = useProfileShadow(opts.author) 43 45 const displayName = author.displayName || author.handle 44 46 const handle = author.handle 47 + // remove dumb typing when you update the atproto api package!! 48 + const pronouns = (author as {pronouns?: string})?.pronouns 45 49 const profileLink = makeProfileLink(author) 46 50 const queryClient = useQueryClient() 47 51 const onOpenAuthor = opts.onOpenAuthor ··· 131 135 style={[ 132 136 a.text_md, 133 137 t.atoms.text_contrast_medium, 134 - {lineHeight:1.17}, 138 + {lineHeight: 1.17}, 135 139 {flexShrink: 10}, 136 140 ]}> 137 141 {NON_BREAKING_SPACE + sanitizeHandle(handle, '@')} 138 142 </WebOnlyInlineLinkText> 143 + {opts.showPronouns && pronouns && ( 144 + <WebOnlyInlineLinkText 145 + emoji 146 + numberOfLines={1} 147 + to={profileLink} 148 + label={_(msg`View Profile`)} 149 + disableMismatchWarning 150 + disableUnderline 151 + onPress={onBeforePressAuthor} 152 + style={[ 153 + t.atoms.text_contrast_low, 154 + a.text_md, 155 + a.leading_tight, 156 + {flexShrink: 5}, 157 + ]}> 158 + {NON_BREAKING_SPACE + sanitizePronouns(pronouns)} 159 + </WebOnlyInlineLinkText> 160 + )} 139 161 </View> 140 162 </ProfileHoverCard> 141 163 ··· 159 181 whiteSpace: 'nowrap', 160 182 }), 161 183 ]}> 162 - {!IS_ANDROID && ( 163 - <Text 164 - style={[ 165 - a.text_md, 166 - a.leading_tight, 167 - t.atoms.text_contrast_medium, 168 - ]} 169 - accessible={false}> 170 - &middot;{' '} 171 - </Text> 184 + {!opts.showPronouns && ( 185 + <> 186 + {!IS_ANDROID && ( 187 + <Text 188 + style={[ 189 + a.text_md, 190 + a.leading_tight, 191 + t.atoms.text_contrast_medium, 192 + ]} 193 + accessible={false}> 194 + &middot;{' '} 195 + </Text> 196 + )} 197 + {timeElapsed} 198 + </> 172 199 )} 173 - {timeElapsed} 174 200 </WebOnlyInlineLinkText> 175 201 )} 176 202 </TimeElapsed>