[Clipclops] Refactor message list (#3832)

* rework the list for accessibility

* Reverse reverse

* progress

* good to start testing

* memo `MessageItem`

* small hack

* use our custom `List` impl

* use `ScrollProvider` for `onScroll` event

* remove use of `runOnJS`

* actually, let's keep it

* add some comments

---------

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Hailey 2024-05-03 14:18:01 -07:00 committed by GitHub
parent 6a4199febb
commit 876816675e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 160 additions and 97 deletions

View file

@ -19,11 +19,9 @@ import {PaperPlane_Stroke2_Corner0_Rounded as PaperPlane} from '#/components/ico
export function MessageInput({
onSendMessage,
onFocus,
onBlur,
}: {
onSendMessage: (message: string) => void
onFocus: () => void
onBlur: () => void
onFocus?: () => void
}) {
const {_} = useLingui()
const t = useTheme()
@ -85,7 +83,6 @@ export function MessageInput({
scrollEnabled={isInputScrollable}
blurOnSubmit={false}
onFocus={onFocus}
onBlur={onBlur}
onContentSizeChange={onInputLayout}
ref={inputRef}
/>