Skip to content

Commit

Permalink
Merge pull request #4096 from tloncorp/po/tlon-3106-re-enable-autofoc…
Browse files Browse the repository at this point in the history
…us-upgrade-tentap

input: update tentap, fixes backspace on autofocus, re-enable autofocus
  • Loading branch information
patosullivan authored Oct 21, 2024
2 parents 8ea66dd + 9ac3bc1 commit 788e76b
Show file tree
Hide file tree
Showing 9 changed files with 1,073 additions and 329 deletions.
4 changes: 2 additions & 2 deletions apps/tlon-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ PODS:
- sqlite3 (3.42.0):
- sqlite3/common (= 3.42.0)
- sqlite3/common (3.42.0)
- tentap (0.5.11):
- tentap (0.5.21):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1878,7 +1878,7 @@ SPEC CHECKSUMS:
SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
sqlite3: f163dbbb7aa3339ad8fc622782c2d9d7b72f7e9c
tentap: 4871503ab3d587fe80fe13f6fe712fde98b57525
tentap: 2cf2e387dd284bf867010eb7d0f91618fb35b673
UMAppLoader: 5df85360d65cabaef544be5424ac64672e648482
Yoga: fb61b2337c7688c81a137e5560b3cbb515289f91

Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
]
},
"dependencies": {
"@10play/tentap-editor": "~0.5.11",
"@10play/tentap-editor": "~0.5.21",
"@aws-sdk/client-s3": "^3.190.0",
"@aws-sdk/s3-request-presigner": "^3.190.0",
"@dev-plugins/async-storage": "^0.0.3",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"allowNonAppliedPatches": true,
"overrides": {
"typescript": "5.4.5",
"@10play/tentap-editor": "0.5.11",
"@10play/tentap-editor": "0.5.21",
"@tiptap/suggestion": "2.6.0",
"@tiptap/extension-mention": "2.6.0",
"@tiptap/extension-hard-break": "2.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"peerDependencies": {
"react": "^18.2.0",
"@10play/tentap-editor": "~0.5.11"
"@10play/tentap-editor": "~0.5.21"
}
}
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"urbit-ob": "^5.0.1"
},
"peerDependencies": {
"@10play/tentap-editor": "~0.5.11",
"@10play/tentap-editor": "~0.5.21",
"@urbit/sigil-js": "^2.2.0",
"expo-image": "*",
"react": "*",
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/src/components/BigInput.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ export function BigInput({
placeholder={placeholder}
bigInput
channelType={channelType}
// TODO: figure out why autofocus breaks backspace
// shouldAutoFocus
shouldAutoFocus
draftType={channelType === 'gallery' ? 'text' : undefined}
ref={editorRef}
/>
Expand Down
9 changes: 4 additions & 5 deletions packages/ui/src/components/PostScreenView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,10 @@ export function PostScreenView({
editPost={editPost}
channelType="chat"
getDraft={getDraft}
// TODO: figure out why autofocus breaks backspace
// shouldAutoFocus={
// (channel.type === 'chat' && parentPost?.replyCount === 0) ||
// !!editingPost
// }
shouldAutoFocus={
(channel.type === 'chat' && parentPost?.replyCount === 0) ||
!!editingPost
}
ref={editorRef}
/>
)}
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/src/components/draftInputs/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export function ChatInput({
setEditingPost={setEditingPost}
editPost={editPost}
channelType={channel.type}
// TODO: figure out why autoFocus breaks backspace
// shouldAutoFocus={!!editingPost}
shouldAutoFocus={!!editingPost}
showInlineAttachments
showAttachmentButton
/>
Expand Down
1,375 changes: 1,061 additions & 314 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 788e76b

Please sign in to comment.