Skip to content
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

Fix jump to bottom flicker #145

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Fix jump to bottom flicker #145

merged 2 commits into from
Jul 11, 2024

Conversation

noxware
Copy link
Collaborator

@noxware noxware commented Jul 10, 2024

Problem

When you try to scroll further than the maximum possible amount, the jump to bottom button flickers.

Screen.Recording.2024-07-10.at.17.11.09.mov

Changes

Detect if the end of the list has been reached in a different way. By telling the portal list to render one more item, and when the portal list renders that, flag that the portal list reached the end.

@@ -429,6 +429,9 @@ pub struct ChatPanel {

#[rust]
state: State,

#[rust]
portal_list_end_reached: bool,
Copy link
Collaborator Author

@noxware noxware Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave this separated as it's just to support this alternative to further_items_bellow_exist.

@noxware noxware force-pushed the fix-jump-bottom-flicker branch from 69967bd to f757a0a Compare July 10, 2024 19:46
@noxware noxware force-pushed the fix-jump-bottom-flicker branch from f757a0a to 2f9db67 Compare July 10, 2024 20:02
@@ -395,6 +395,7 @@ live_design! {

UserChatLine = <UserChatLine> {}
ModelChatLine = <ModelChatLine> {}
EndOfChat = <View> {height: 0.1}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to render something real with non-zero height at the end to make this trick work.

@jmbejar jmbejar merged commit 23b0c85 into main Jul 11, 2024
@jmbejar jmbejar deleted the fix-jump-bottom-flicker branch July 11, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants