Skip to content

msglist: Leave blank space for "mark as read" button so using it doesn't cause messages to shift #562

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

Closed
gnprice opened this issue Mar 12, 2024 · 3 comments · Fixed by #565
Assignees
Labels
a-design Visual and UX design a-msglist The message-list screen, except what's label:a-content beta feedback Things beta users have specifically asked for

Comments

@gnprice
Copy link
Member

gnprice commented Mar 12, 2024

A request from @terpimost. See chat thread.

This is a sort of followup to #400.

@gnprice gnprice added a-msglist The message-list screen, except what's label:a-content a-design Visual and UX design beta feedback Things beta users have specifically asked for labels Mar 12, 2024
@gnprice gnprice added this to the Beta 2 milestone Mar 12, 2024
@abelaba
Copy link
Contributor

abelaba commented Mar 12, 2024

Hello,

I have been going over the codebase for a couple of days now to understand the project more and read about Zulips best git practices. I would love the chance to work on this project and work on this issue.

I have been able to locate which file I need to work on to fix this issue and I have started working on it.

@abelaba
Copy link
Contributor

abelaba commented Mar 12, 2024

I have been able to fix this issue by updating the MarkAsReadWidget. Currently, I am trying to find a way to update the existing tests. The tests were previously written to check if the size of the widget > 0, but that won't work anymore since the widget will always have a size.

@gnprice
Copy link
Member Author

gnprice commented Mar 12, 2024

Hi @abelaba, welcome. I've assigned you the issue.

For questions about details of the code, the best place would be a chat thread in #mobile-team on chat.zulip.org.

In general, one thing we try to do when writing tests is to write them in a way that reflects the UI as the user sees it. So: as far as the user is concerned, what's different when the button is shown vs. when it's not shown? After your changes, the size of that widget will be the same in both cases; but there will be other things that are different. So then try to write a test that checks for one of those differences.

If you have follow-up questions after spending some time trying to do that, please go ahead and start a thread in #mobile-team with details on what you've thought or tried so far, and we'll be glad to help.

abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 13, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget with a definite height, which is equal to the size of the button and won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 13, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget with a definite height, which is equal to the size of the button and won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 14, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget with a definite height, which is equal to the size of the button and won't cause the message list to shift down.

Previously there used to be an empty widget below the "mark as read" button, but that has also been removed.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 14, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget with a definite height, which is equal to the size of the button and won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 17, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget which will display the button based on the opacity level and will disable the region the button holds once the button is pressed, thus won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 22, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget which will display the button based on the opacity level and will disable the region the button holds once the button is pressed, thus won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 24, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget which will display the button based on the opacity level and will disable the region the button holds once the button is pressed, thus won't cause the message list to shift down.

Fixes: zulip#562
abelaba added a commit to abelaba/zulip-flutter that referenced this issue Mar 25, 2024
…n't cause messages to shift

This commit addresses the issue of the message list shifting downwards when the "mark as read" button is pressed. The previous implementation would return an empty widget when the button was pressed and cause the message list to shift down. Now it takes a widget which will display the button based on the opacity level and will disable the region the button holds once the button is pressed, thus won't cause the message list to shift down.

Fixes: zulip#562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-design Visual and UX design a-msglist The message-list screen, except what's label:a-content beta feedback Things beta users have specifically asked for
Projects
Status: Done
2 participants