Bluesky app fork with some witchin' additions 💫

Spelling (#772)

* spelling: account

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: activated

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: additional

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: appropriate

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: bskyweb

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: description

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: display

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: highlighted

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: locally-hosted

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: occurring

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: parenthetical

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: preexisting

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: prefetched

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: punctuation

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: simplicity

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

authored by

Josh Soref and committed by
GitHub
c8087219 724951e2

+48 -41
+2 -2
Dockerfile
··· 17 17 COPY . . 18 18 19 19 # 20 - # Generate the Javascript webpack. 20 + # Generate the JavaScript webpack. 21 21 # 22 22 RUN mkdir --parents $NVM_DIR && \ 23 23 wget \ ··· 36 36 RUN find ./bskyweb/static && find ./web-build/static 37 37 38 38 # 39 - # Generate the bksyweb Go binary. 39 + # Generate the bskyweb Go binary. 40 40 # 41 41 RUN cd bskyweb/ && \ 42 42 go mod download && \
+2 -2
__tests__/lib/string.test.ts
··· 48 48 'Classic article https://socket3.wordpress.com/2018/02/03/designing-windows-95s-user-interface/ ', 49 49 'https://foo.com https://bar.com/whatever https://baz.com', 50 50 'punctuation https://foo.com, https://bar.com/whatever; https://baz.com.', 51 - 'parenthentical (https://foo.com)', 51 + 'parenthetical (https://foo.com)', 52 52 'except for https://foo.com/thing_(cool)', 53 53 ] 54 54 const outputs = [ ··· 112 112 {link: 'https://baz.com'}, 113 113 '.', 114 114 ], 115 - ['parenthentical (', {link: 'https://foo.com'}, ')'], 115 + ['parenthetical (', {link: 'https://foo.com'}, ')'], 116 116 ['except for ', {link: 'https://foo.com/thing_(cool)'}], 117 117 ] 118 118 it('correctly handles a set of text inputs', () => {
+1 -1
bskyweb/README.md
··· 2 2 3 3 ### SPA Bundle (monolithic static javascript file) 4 4 5 - To build the SPA bundle (`bundle.web.js`), first get a Javascript development 5 + To build the SPA bundle (`bundle.web.js`), first get a JavaScript development 6 6 environment set up. Either follow the top-level README, or something quick 7 7 like: 8 8
+2 -2
bskyweb/templates/base.html
··· 122 122 {%- block body_all %} 123 123 <div id="root"></div> 124 124 <noscript> 125 - <h1>Javascript Required</h1> 126 - <p>This is a heavily interactive web application, and Javascript is required. Simple HTML interfaces are possible, but that is not what this is. 125 + <h1>JavaScript Required</h1> 126 + <p>This is a heavily interactive web application, and JavaScript is required. Simple HTML interfaces are possible, but that is not what this is. 127 127 <p>Learn more about Bluesky at <a href="https://blueskyweb.xyz">blueskyweb.xyz</a> and <a href="https://atproto.com">atproto.com</a>. 128 128 {% block noscript_extra %}{% endblock %} 129 129 </noscript>
+2 -2
docs/build.md
··· 26 26 - Run once: `yarn e2e:build` 27 27 - Each test run: `yarn e2e:run` 28 28 - Tips 29 - - Make sure you copy the `.env.example` to `.env` and add the appropiate tokens (e.g. `SENTRY_AUTH_TOKEN` can be created on the Sentry dashboard). If this is not required, you can remove it from `eas.json` and `package.json`, as well as any mentions in the code. 29 + - Make sure you copy the `.env.example` to `.env` and add the appropriate tokens (e.g. `SENTRY_AUTH_TOKEN` can be created on the Sentry dashboard). If this is not required, you can remove it from `eas.json` and `package.json`, as well as any mentions in the code. 30 30 - If you want to use Expo EAS on your own builds without ejecting from Expo, make sure to change the `owner` as well as `extra.eas.projectId` properties. If you do not have an Expo account, you may remove these properties. 31 31 - `npx react-native info` Checks what has been installed. 32 32 - The android simulator won't be able to access localhost services unless you run `adb reverse tcp:{PORT} tcp:{PORT}` 33 - - For instance, the localhosted dev-wallet will need `adb reverse tcp:3001 tcp:3001` 33 + - For instance, the locally-hosted dev-wallet will need `adb reverse tcp:3001 tcp:3001` 34 34 - For some reason, the typescript compiler chokes on platform-specific files (e.g. `foo.native.ts`) but only when compiling for Web thus far. Therefore we always have one version of the file which doesn't use a platform specifier, and that should be the Web version. ([More info](https://stackoverflow.com/questions/44001050/platform-specific-import-component-in-react-native-with-typescript).) 35 35 36 36 ## Go-Server Build
+16 -14
src/lib/notifee.ts
··· 41 41 } 42 42 43 43 export function displayNotificationFromModel( 44 - notif: NotificationsFeedItemModel, 44 + notification: NotificationsFeedItemModel, 45 45 ) { 46 46 let author = sanitizeDisplayName( 47 - notif.author.displayName || notif.author.handle, 47 + notification.author.displayName || notification.author.handle, 48 48 ) 49 49 let title: string 50 50 let body: string = '' 51 - if (notif.isLike) { 51 + if (notification.isLike) { 52 52 title = `${author} liked your post` 53 - body = notif.additionalPost?.thread?.postRecord?.text || '' 54 - } else if (notif.isRepost) { 53 + body = notification.additionalPost?.thread?.postRecord?.text || '' 54 + } else if (notification.isRepost) { 55 55 title = `${author} reposted your post` 56 - body = notif.additionalPost?.thread?.postRecord?.text || '' 57 - } else if (notif.isMention) { 56 + body = notification.additionalPost?.thread?.postRecord?.text || '' 57 + } else if (notification.isMention) { 58 58 title = `${author} mentioned you` 59 - body = notif.additionalPost?.thread?.postRecord?.text || '' 60 - } else if (notif.isReply) { 59 + body = notification.additionalPost?.thread?.postRecord?.text || '' 60 + } else if (notification.isReply) { 61 61 title = `${author} replied to your post` 62 - body = notif.additionalPost?.thread?.postRecord?.text || '' 63 - } else if (notif.isFollow) { 62 + body = notification.additionalPost?.thread?.postRecord?.text || '' 63 + } else if (notification.isFollow) { 64 64 title = 'New follower!' 65 65 body = `${author} has followed you` 66 66 } else { ··· 68 68 } 69 69 let image 70 70 if ( 71 - AppBskyEmbedImages.isView(notif.additionalPost?.thread?.post.embed) && 72 - notif.additionalPost?.thread?.post.embed.images[0]?.thumb 71 + AppBskyEmbedImages.isView( 72 + notification.additionalPost?.thread?.post.embed, 73 + ) && 74 + notification.additionalPost?.thread?.post.embed.images[0]?.thumb 73 75 ) { 74 - image = notif.additionalPost.thread.post.embed.images[0].thumb 76 + image = notification.additionalPost.thread.post.embed.images[0].thumb 75 77 } 76 78 return displayNotification(title, body, image) 77 79 }
+1 -1
src/lib/routes/helpers.ts
··· 11 11 export function isStateAtTabRoot(state: State | undefined) { 12 12 if (!state) { 13 13 // NOTE 14 - // if state is not defined it's because init is occuring 14 + // if state is not defined it's because init is occurring 15 15 // and therefore we can safely assume we're at root 16 16 // -prf 17 17 return true
+1 -1
src/lib/strings/rich-text-detection.ts
··· 27 27 matchValue = matchValue.slice(1) 28 28 } 29 29 30 - // strip ending puncuation 30 + // strip ending punctuation 31 31 if (/[.,;!?]$/.test(matchValue)) { 32 32 matchValue = matchValue.slice(0, -1) 33 33 }
+1 -1
src/platform/polyfills.ts
··· 23 23 ) 24 24 } 25 25 26 - // Adding the padding if missing, for semplicity 26 + // Adding the padding if missing, for simplicity 27 27 str += '=='.slice(2 - (str.length & 3)) 28 28 var bitmap, 29 29 result = '',
+9 -4
src/state/models/content/post-thread.ts
··· 118 118 119 119 assignTreeModels( 120 120 v: AppBskyFeedDefs.ThreadViewPost, 121 - higlightedPostUri: string, 121 + highlightedPostUri: string, 122 122 includeParent = true, 123 123 includeChildren = true, 124 124 ) { ··· 130 130 parentModel._showChildReplyLine = true 131 131 if (v.parent.parent) { 132 132 parentModel._showParentReplyLine = true 133 - parentModel.assignTreeModels(v.parent, higlightedPostUri, true, false) 133 + parentModel.assignTreeModels( 134 + v.parent, 135 + highlightedPostUri, 136 + true, 137 + false, 138 + ) 134 139 } 135 140 this.parent = parentModel 136 141 } else if (AppBskyFeedDefs.isNotFoundPost(v.parent)) { ··· 147 152 const itemModel = new PostThreadItemModel(this.rootStore, item) 148 153 itemModel._depth = this._depth + 1 149 154 itemModel._showParentReplyLine = 150 - itemModel.parentUri !== higlightedPostUri && replies.length === 0 155 + itemModel.parentUri !== highlightedPostUri && replies.length === 0 151 156 if (item.replies?.length) { 152 157 itemModel._showChildReplyLine = true 153 - itemModel.assignTreeModels(item, higlightedPostUri, false, true) 158 + itemModel.assignTreeModels(item, highlightedPostUri, false, true) 154 159 } 155 160 replies.push(itemModel) 156 161 } else if (AppBskyFeedDefs.isNotFoundPost(item)) {
+3 -3
src/state/models/feeds/notifications.ts
··· 181 181 return false 182 182 } 183 183 184 - get additionaDataUri(): string | undefined { 184 + get additionalDataUri(): string | undefined { 185 185 if (this.isReply || this.isQuote || this.isMention) { 186 186 return this.uri 187 187 } else if (this.isLike || this.isRepost) { ··· 492 492 'mostRecent', 493 493 res.data.notifications[0], 494 494 ) 495 - const addedUri = notif.additionaDataUri 495 + const addedUri = notif.additionalDataUri 496 496 if (addedUri) { 497 497 const postsRes = await this.rootStore.agent.app.bsky.feed.getPosts({ 498 498 uris: [addedUri], ··· 585 585 `item-${_idCounter++}`, 586 586 item, 587 587 ) 588 - const uri = itemModel.additionaDataUri 588 + const uri = itemModel.additionalDataUri 589 589 if (uri) { 590 590 const models = addedPostMap.get(uri) || [] 591 591 models.push(itemModel)
+2 -2
src/state/models/session.ts
··· 187 187 account => account.service === service && account.did === did, 188 188 ) 189 189 190 - // fall back to any pre-existing access tokens 190 + // fall back to any preexisting access tokens 191 191 let refreshJwt = session?.refreshJwt || existingAccount?.refreshJwt 192 192 let accessJwt = session?.accessJwt || existingAccount?.accessJwt 193 193 if (event === 'expired') { ··· 247 247 const res = await agent.getProfile({actor: did}).catch(_e => undefined) 248 248 if (res) { 249 249 return { 250 - dispayName: res.data.displayName, 250 + displayName: res.data.displayName, 251 251 aviUrl: res.data.avatar, 252 252 } 253 253 }
+3 -3
src/view/com/auth/create/Step1.tsx
··· 32 32 model.setServiceDescription(undefined) 33 33 }, [setIsDefaultSelected, model]) 34 34 35 - const fetchServiceDesription = React.useMemo( 35 + const fetchServiceDescription = React.useMemo( 36 36 () => debounce(() => model.fetchServiceDescription(), 1e3), 37 37 [model], 38 38 ) ··· 40 40 const onChangeServiceUrl = React.useCallback( 41 41 (v: string) => { 42 42 model.setServiceUrl(v) 43 - fetchServiceDesription() 43 + fetchServiceDescription() 44 44 }, 45 - [model, fetchServiceDesription], 45 + [model, fetchServiceDescription], 46 46 ) 47 47 48 48 const onDebugChangeServiceUrl = React.useCallback(
+1 -1
src/view/com/profile/ProfileHeader.tsx
··· 218 218 onRefreshAll() 219 219 Toast.show('Account unblocked') 220 220 } catch (e: any) { 221 - store.log.error('Failed to block unaccount', e) 221 + store.log.error('Failed to block account', e) 222 222 Toast.show(`There was an issue! ${e.toString()}`) 223 223 } 224 224 },
+1 -1
src/view/com/util/post-embeds/index.tsx
··· 109 109 RNImage.prefetch(firstImageToShow) 110 110 items.forEach(item => { 111 111 if (firstImageToShow !== item.uri) { 112 - // First image already prefeched above 112 + // First image already prefetched above 113 113 RNImage.prefetch(item.uri) 114 114 } 115 115 })
+1 -1
src/view/screens/Home.tsx
··· 202 202 } 203 203 }, [store, doPoll, onSoftReset, screen, feed]), 204 204 ) 205 - // fires when tab is actived/deactivated 205 + // fires when tab is activated/deactivated 206 206 // - check for latest 207 207 useTabFocusEffect( 208 208 'Home',