-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Gekidou] Add performance and code improvements around post_list #6113
Changes from 3 commits
1665a9c
6a64721
777727b
97ca4ea
189281e
77bd202
0d975bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ import {makeStyleSheetFromTheme} from '@utils/theme'; | |
import UploadItem from './upload_item'; | ||
|
||
const CONTAINER_HEIGHT_MAX = 67; | ||
const CONATINER_HEIGHT_MIN = 0; | ||
const CONTAINER_HEIGHT_MIN = 0; | ||
const ERROR_HEIGHT_MAX = 20; | ||
const ERROR_HEIGHT_MIN = 0; | ||
|
||
|
@@ -80,7 +80,7 @@ function Uploads({ | |
const style = getStyleSheet(theme); | ||
|
||
const errorHeight = useSharedValue(ERROR_HEIGHT_MIN); | ||
const containerHeight = useSharedValue(CONTAINER_HEIGHT_MAX); | ||
const containerHeight = useSharedValue(files.length ? CONTAINER_HEIGHT_MAX : CONTAINER_HEIGHT_MIN); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what changed, but this was not being updated on the effect on the first render. Now it is initialized to the correct value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The result was that when opening the channel, the height was as if a file was uploaded. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how did you find out about this ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know exactly the details. I was moving things around, and suddenly (I don't realize what the change must be) I started seeing the input box higher than usual. I realized it was the space of the uploads (it was not part of the textbox and was not reactive to clicks). |
||
const filesForGallery = useRef(files.filter((f) => !f.failed && !DraftUploadManager.isUploading(f.clientId!))); | ||
|
||
const errorAnimatedStyle = useAnimatedStyle(() => { | ||
|
@@ -116,7 +116,7 @@ function Uploads({ | |
containerHeight.value = CONTAINER_HEIGHT_MAX; | ||
return; | ||
} | ||
containerHeight.value = CONATINER_HEIGHT_MIN; | ||
containerHeight.value = CONTAINER_HEIGHT_MIN; | ||
}, [files.length > 0]); | ||
|
||
const openGallery = useCallback((file: FileInfo) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something was broken in the channel_list header index that was preventing the header from being rendered in the failure cases, that got fixed with the changes on the way we handle permissions.
These changes are to adapt to the test now showing the header, and showing it correctly.