diff --git a/__tests__/lib/string.test.ts b/__tests__/lib/string.test.ts index c59c8b3e3..563e6cf05 100644 --- a/__tests__/lib/string.test.ts +++ b/__tests__/lib/string.test.ts @@ -228,11 +228,16 @@ describe('cleanError', () => { describe('toNiceDomain', () => { const inputs = [ 'https://example.com/index.html', - 'https://bsky.app', + 'https://blacksky.app', 'https://bsky.social', '#123123123', ] - const outputs = ['example.com', 'bsky.app', 'Bluesky Social', '#123123123'] + const outputs = [ + 'example.com', + 'Blacksky Algorithms', + 'bsky.social', + '#123123123', + ] it("displays the url's host in a easily readable manner", () => { for (let i = 0; i < inputs.length; i++) { @@ -270,8 +275,8 @@ describe('toShareUrl', () => { const inputs = ['https://bsky.app', '/3jk7x4irgv52r', 'item/test/123'] const outputs = [ 'https://bsky.app', - 'https://bsky.app/3jk7x4irgv52r', - 'https://bsky.app/item/test/123', + 'https://blacksky.community/3jk7x4irgv52r', + 'https://blacksky.community/item/test/123', ] it('appends https, when not present', () => { @@ -443,58 +448,69 @@ describe('parseEmbedPlayerFromUrl', () => { { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=1', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=1', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=1', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=1', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_short', source: 'youtubeShorts', hideDetails: true, - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, { type: 'youtube_video', source: 'youtube', - playerUri: 'https://bsky.app/iframe/youtube.html?videoId=videoId&start=0', + playerUri: + 'https://blacksky.community/iframe/youtube.html?videoId=videoId&start=0', }, undefined, @@ -835,13 +851,13 @@ describe('createStarterPackLinkFromAndroidReferrer', () => { it('returns a link when input contains utm_source and utm_content', () => { expect( createStarterPackLinkFromAndroidReferrer( - 'utm_source=bluesky&utm_content=starterpack_haileyok.com_rkey', + 'utm_source=blacksky&utm_content=starterpack_haileyok.com_rkey', ), ).toEqual(validOutput) expect( createStarterPackLinkFromAndroidReferrer( - 'utm_source=bluesky&utm_content=starterpack_test-lover-9000.com_rkey', + 'utm_source=blacksky&utm_content=starterpack_test-lover-9000.com_rkey', ), ).toEqual('at://test-lover-9000.com/app.bsky.graph.starterpack/rkey') }) @@ -849,7 +865,7 @@ describe('createStarterPackLinkFromAndroidReferrer', () => { it('returns a link when input contains utm_source and utm_content in different order', () => { expect( createStarterPackLinkFromAndroidReferrer( - 'utm_content=starterpack_haileyok.com_rkey&utm_source=bluesky', + 'utm_content=starterpack_haileyok.com_rkey&utm_source=blacksky', ), ).toEqual(validOutput) }) @@ -857,7 +873,7 @@ describe('createStarterPackLinkFromAndroidReferrer', () => { it('returns a link when input contains other parameters as well', () => { expect( createStarterPackLinkFromAndroidReferrer( - 'utm_source=bluesky&utm_medium=starterpack&utm_content=starterpack_haileyok.com_rkey', + 'utm_source=blacksky&utm_medium=starterpack&utm_content=starterpack_haileyok.com_rkey', ), ).toEqual(validOutput) }) @@ -872,7 +888,7 @@ describe('createStarterPackLinkFromAndroidReferrer', () => { it('returns null when utm_content is not present', () => { expect( - createStarterPackLinkFromAndroidReferrer('utm_source=bluesky'), + createStarterPackLinkFromAndroidReferrer('utm_source=blacksky'), ).toEqual(null) }) @@ -981,7 +997,7 @@ describe('parseStarterPackHttpUri', () => { describe('createStarterPackGooglePlayUri', () => { const base = - 'https://play.google.com/store/apps/details?id=xyz.blueskyweb.app&referrer=utm_source%3Dbluesky%26utm_medium%3Dstarterpack%26utm_content%3Dstarterpack_' + 'https://play.google.com/store/apps/details?id=community.blacksky.app&referrer=utm_source%3Dblacksky%26utm_medium%3Dstarterpack%26utm_content%3Dstarterpack_' it('returns valid google play uri when input is valid', () => { expect(createStarterPackGooglePlayUri('name', 'rkey')).toEqual( diff --git a/src/analytics/features/index.ts b/src/analytics/features/index.ts index 2d5eaee4c..427755f7e 100644 --- a/src/analytics/features/index.ts +++ b/src/analytics/features/index.ts @@ -43,10 +43,12 @@ export const features = new GrowthBook({ * that case, we may see a flash of uncustomized content until the * initialization completes. */ -export const init = features.init({timeout: TIMEOUT_INIT, streaming: true}).catch(() => { - // Swallow errors from GrowthBook init (e.g. CORS failures, cache - // corruption). The app should still load without feature gates. -}) +export const init = features + .init({timeout: TIMEOUT_INIT, streaming: true}) + .catch(() => { + // Swallow errors from GrowthBook init (e.g. CORS failures, cache + // corruption). The app should still load without feature gates. + }) /** * Refresh feature gates from GrowthBook. Updates attributes based on the diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 31e9feb82..8a22f499d 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -125,9 +125,9 @@ export function useLink({ const requiresWarning = Boolean( !disableMismatchWarning && - displayText && - isExternal && - linkRequiresWarning(href, displayText), + displayText && + isExternal && + linkRequiresWarning(href, displayText), ) if (IS_WEB) { @@ -220,9 +220,9 @@ export function useLink({ const handleLongPress = React.useCallback(() => { const requiresWarning = Boolean( !disableMismatchWarning && - displayText && - isExternal && - linkRequiresWarning(href, displayText), + displayText && + isExternal && + linkRequiresWarning(href, displayText), ) if (requiresWarning) { diff --git a/src/components/RichTextTag.tsx b/src/components/RichTextTag.tsx index fe06252b2..b617cdb0e 100644 --- a/src/components/RichTextTag.tsx +++ b/src/components/RichTextTag.tsx @@ -61,7 +61,7 @@ export function RichTextTag({ optimisticUpsert?.find( m => m.value === tag && m.targets.includes('tag'), )) && - !optimisticRemove?.find(m => m?.value === tag), + !optimisticRemove?.find(m => m?.value === tag), ) /* diff --git a/src/screens/Moderation/index.tsx b/src/screens/Moderation/index.tsx index 53f1219f7..c2aac7ff6 100644 --- a/src/screens/Moderation/index.tsx +++ b/src/screens/Moderation/index.tsx @@ -321,70 +321,70 @@ export function ModerationScreenInner({ t.atoms.bg_contrast_25, ]}> - - Enable adult content + style={[ + a.py_lg, + a.px_lg, + a.flex_row, + a.align_center, + a.justify_between, + adultContentUIDisabled && {opacity: 0.5}, + ]}> + + Enable adult content + + + + + {adultContentEnabled ? ( + Enabled + ) : ( + Disabled + )} - - - - {adultContentEnabled ? ( - Enabled - ) : ( - Disabled - )} - - - - + - {adultContentUIDisabledOnIOS && ( - - - - Adult content can only be enabled via the Web at{' '} - { - evt.preventDefault() - Linking.openURL('https://bsky.app/') - return false - }}> - bsky.app - - . - - - - )} + + + {adultContentUIDisabledOnIOS && ( + + + + Adult content can only be enabled via the Web at{' '} + { + evt.preventDefault() + Linking.openURL('https://bsky.app/') + return false + }}> + bsky.app + + . + + + + )} - {adultContentEnabled && ( - <> - - - - - - - - - - )} + {adultContentEnabled && ( + <> + + + + + + + + + + )} diff --git a/src/screens/Profile/Header/Handle.tsx b/src/screens/Profile/Header/Handle.tsx index 606e0a9ec..2ebf498af 100644 --- a/src/screens/Profile/Header/Handle.tsx +++ b/src/screens/Profile/Header/Handle.tsx @@ -66,13 +66,8 @@ export function ProfileHeaderHandle({ )} {sanitizePronouns(pronouns ?? '', IS_NATIVE) && ( - -{sanitizePronouns(pronouns ?? '', IS_NATIVE)} + + {sanitizePronouns(pronouns ?? '', IS_NATIVE)} )} diff --git a/src/screens/Settings/FollowingFeedPreferences.tsx b/src/screens/Settings/FollowingFeedPreferences.tsx index 7f1ae1d32..658456e0e 100644 --- a/src/screens/Settings/FollowingFeedPreferences.tsx +++ b/src/screens/Settings/FollowingFeedPreferences.tsx @@ -44,7 +44,7 @@ export function FollowingFeedPreferencesScreen({}: Props) { const mergeFeedEnabled = Boolean( variables?.lab_mergeFeedEnabled ?? - preferences?.feedViewPrefs?.lab_mergeFeedEnabled, + preferences?.feedViewPrefs?.lab_mergeFeedEnabled, ) return ( diff --git a/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx b/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx index e2dfd2cd0..58cc745d6 100644 --- a/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx +++ b/src/screens/Signup/StepCaptcha/CaptchaWebView.tsx @@ -45,11 +45,11 @@ export function CaptchaWebView({ }, []) const redirectHost = useMemo(() => { - if (!state?.serviceUrl) return 'blacksky.community' + if (!state?.serviceUrl) return 'blacksky.community' return state?.serviceUrl && new URL(state?.serviceUrl).host === 'staging.bsky.dev' - ? 'app.staging.bsky.dev' + ? 'app.staging.bsky.dev' : 'blacksky.community' }, [state?.serviceUrl]) diff --git a/src/screens/Signup/StepHandle/index.tsx b/src/screens/Signup/StepHandle/index.tsx index 23367b22f..021b825a1 100644 --- a/src/screens/Signup/StepHandle/index.tsx +++ b/src/screens/Signup/StepHandle/index.tsx @@ -162,8 +162,7 @@ export function StepHandle() { value: selectedDomain, }) dispatch({type: 'prev'}) - ax.metric('signup:backPressed', {activeStep: state.activeStep} - ) + ax.metric('signup:backPressed', {activeStep: state.activeStep}) } return ( @@ -287,8 +286,7 @@ export function StepHandle() { {isHandleAvailable?.suggestions && - isHandleAvailable.suggestions.length > 0 && - ( + isHandleAvailable.suggestions.length > 0 && ( { diff --git a/src/screens/Topic.tsx b/src/screens/Topic.tsx index 9a0870dbf..1b673892b 100644 --- a/src/screens/Topic.tsx +++ b/src/screens/Topic.tsx @@ -102,7 +102,13 @@ export default function TopicScreen({ } // Legacy: search-based topic view (non-numeric topic param) - return + return ( + + ) } function CuratedTopicFeed({ diff --git a/src/state/session/__tests__/session-test.ts b/src/state/session/__tests__/session-test.ts index 60d897e15..cb35dd4d6 100644 --- a/src/state/session/__tests__/session-test.ts +++ b/src/state/session/__tests__/session-test.ts @@ -10,8 +10,6 @@ jest.mock('jwt-decode', () => ({ }, })) -jest.mock('../../birthdate') -jest.mock('../../../ageAssurance/data') jest.mock('#/lib/notifications/notifications', () => ({ unregisterPushToken(_agents: BskyAgent[]) { return Promise.resolve() diff --git a/src/state/shell/composer/index.tsx b/src/state/shell/composer/index.tsx index 263ab845a..591f39e3c 100644 --- a/src/state/shell/composer/index.tsx +++ b/src/state/shell/composer/index.tsx @@ -95,9 +95,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) { const author = opts.replyTo?.author || opts.quote?.author const isBlocked = Boolean( author && - (author.viewer?.blocking || - author.viewer?.blockedBy || - author.viewer?.blockingByList), + (author.viewer?.blocking || + author.viewer?.blockedBy || + author.viewer?.blockingByList), ) if (isBlocked) { Toast.show( diff --git a/src/view/shell/createNativeStackNavigatorWithAuth.tsx b/src/view/shell/createNativeStackNavigatorWithAuth.tsx index ce5bbc747..ffe66d217 100644 --- a/src/view/shell/createNativeStackNavigatorWithAuth.tsx +++ b/src/view/shell/createNativeStackNavigatorWithAuth.tsx @@ -162,7 +162,6 @@ function NativeStackNavigator({ {!isMobile && } )} - ) }