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_: reloading of contacts when selected and unselected #20582

Closed
wants to merge 1 commit into from

Conversation

jo-mut
Copy link
Contributor

@jo-mut jo-mut commented Jun 26, 2024

fixes #20532

Summary

When the user navigates to the contact screen, the contact list item is already pre-checked for the group members. The user then has the option to either add new contacts to the group or the group members.

The contact list item initialises an atom that gets updated when the user selects and unselects a contact however when the screen reloads and the atom loses state to the default value and because of this, the user has to repeat the process again

@jo-mut jo-mut self-assigned this Jun 26, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Jun 26, 2024

Jenkins Builds

Click to see older builds (37)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 21c8389 #1 2024-06-26 16:38:34 ~4 min tests 📄log
✔️ 21c8389 #1 2024-06-26 16:41:07 ~6 min android-e2e 🤖apk 📲
✔️ 21c8389 #1 2024-06-26 16:41:24 ~7 min android 🤖apk 📲
✔️ 21c8389 #1 2024-06-26 16:54:34 ~20 min ios 📱ipa 📲
✔️ 69f8432 #2 2024-06-28 10:50:49 ~4 min tests 📄log
✔️ 69f8432 #2 2024-06-28 10:53:14 ~7 min android-e2e 🤖apk 📲
✔️ 69f8432 #2 2024-06-28 10:53:32 ~7 min android 🤖apk 📲
✔️ 69f8432 #2 2024-06-28 10:55:48 ~9 min ios 📱ipa 📲
✔️ 795fda6 #3 2024-07-01 09:13:06 ~4 min tests 📄log
✔️ 795fda6 #3 2024-07-01 09:16:31 ~7 min android-e2e 🤖apk 📲
✔️ 795fda6 #3 2024-07-01 09:16:42 ~8 min android 🤖apk 📲
✔️ 795fda6 #3 2024-07-01 09:17:28 ~8 min ios 📱ipa 📲
efd8a5a #4 2024-07-01 09:45:46 ~6 min tests 📄log
✔️ efd8a5a #4 2024-07-01 09:47:54 ~8 min android 🤖apk 📲
✔️ efd8a5a #4 2024-07-01 09:48:19 ~8 min android-e2e 🤖apk 📲
✔️ efd8a5a #4 2024-07-01 09:50:39 ~10 min ios 📱ipa 📲
✔️ efd8a5a #5 2024-07-01 11:52:22 ~5 min tests 📄log
✔️ efd8a5a #8 2024-07-04 13:18:43 ~4 min tests 📄log
✔️ efd8a5a #7 2024-07-04 13:20:33 ~6 min android-e2e 🤖apk 📲
✔️ efd8a5a #7 2024-07-04 13:20:51 ~6 min android 🤖apk 📲
✔️ efd8a5a #7 2024-07-04 13:23:37 ~9 min ios 📱ipa 📲
✔️ efd8a5a #10 2024-07-04 15:04:42 ~4 min tests 📄log
✔️ efd8a5a #9 2024-07-04 15:06:33 ~6 min android-e2e 🤖apk 📲
✔️ efd8a5a #9 2024-07-04 15:08:55 ~9 min android 🤖apk 📲
✔️ efd8a5a #9 2024-07-04 15:09:26 ~9 min ios 📱ipa 📲
✔️ fcc7919 #5 2024-07-01 12:50:15 ~10 min ios 📱ipa 📲
✔️ fcc7919 #6 2024-07-01 12:53:12 ~13 min tests 📄log
✔️ fcc7919 #5 2024-07-01 12:53:47 ~14 min android 🤖apk 📲
✔️ fcc7919 #5 2024-07-01 12:56:40 ~17 min android-e2e 🤖apk 📲
✔️ 8fafaa3 #11 2024-07-09 11:03:27 ~4 min tests 📄log
✔️ 8fafaa3 #10 2024-07-09 11:06:18 ~7 min android-e2e 🤖apk 📲
✔️ 8fafaa3 #10 2024-07-09 11:06:56 ~8 min android 🤖apk 📲
✔️ 8fafaa3 #10 2024-07-09 11:12:36 ~13 min ios 📱ipa 📲
✔️ b68f387 #13 2024-07-12 13:39:05 ~4 min tests 📄log
✔️ b68f387 #12 2024-07-12 13:40:35 ~6 min android 🤖apk 📲
✔️ b68f387 #12 2024-07-12 13:42:06 ~7 min android-e2e 🤖apk 📲
✔️ b68f387 #12 2024-07-12 13:43:31 ~9 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3ab44d7 #14 2024-07-25 10:00:01 ~9 min tests 📄log
✔️ 3ab44d7 #13 2024-07-25 10:01:12 ~10 min ios 📱ipa 📲
✔️ 3ab44d7 #13 2024-07-25 10:01:36 ~11 min android-e2e 🤖apk 📲
✔️ 3ab44d7 #13 2024-07-25 10:01:57 ~11 min android 🤖apk 📲
✔️ 74c3818 #15 2024-07-29 08:27:14 ~4 min tests 📄log
✔️ 74c3818 #14 2024-07-29 08:29:21 ~6 min android-e2e 🤖apk 📲
✔️ 74c3818 #14 2024-07-29 08:29:38 ~6 min android 🤖apk 📲
✔️ 74c3818 #14 2024-07-29 08:31:52 ~9 min ios 📱ipa 📲

@jo-mut jo-mut marked this pull request as ready for review June 27, 2024 10:12
@Parveshdhull
Copy link
Member

hi linked issue is probably wrong #20513

@jo-mut
Copy link
Contributor Author

jo-mut commented Jun 27, 2024

updated it thanks @Parveshdhull

Copy link
Member

@flexsurfer flexsurfer left a comment

Choose a reason for hiding this comment

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

this doesn't look like a proper fix, because the gesture is used for the purpose here, we need to find the reason and fix it, we should keep the gesture

@jo-mut jo-mut force-pushed the fix/contact-screan-reloading-bug branch 3 times, most recently from 795fda6 to efd8a5a Compare July 1, 2024 09:39
@jo-mut jo-mut requested a review from flexsurfer July 1, 2024 09:59
@@ -50,7 +50,7 @@
item])))))

(defn add-manage-members
[{:keys [scroll-enabled? on-scroll]}]
Copy link
Member

Choose a reason for hiding this comment

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

but we can't just remove these props? they are needed

Copy link
Contributor Author

@jo-mut jo-mut Jul 1, 2024

Choose a reason for hiding this comment

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

@flexsurfer do you know why we need them. I dont see why we need them on this part and scroll-enabled? is the cause for this issue.

Copy link
Member

Choose a reason for hiding this comment

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

it is used to close the screen by scrolling, but still we need to know the reason, we can't just remove functionality

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@flexsurfer the screen here will always re-render when scroll-enabled is updated and this is why scrolling stops working for a moment because its actually disabled.

I am not sure but assuming this is reason why this enabling and disabling of scroll was avoided in other areas like invite contacts to community where its the same list of contacts and the same functionality would probably be needed

@jo-mut jo-mut force-pushed the fix/contact-screan-reloading-bug branch 5 times, most recently from 7dc5277 to efd8a5a Compare July 4, 2024 14:59
@jo-mut jo-mut force-pushed the fix/contact-screan-reloading-bug branch 3 times, most recently from 8c49de3 to b68f387 Compare July 12, 2024 13:34
@jo-mut jo-mut requested a review from flexsurfer July 25, 2024 09:41
@jo-mut
Copy link
Contributor Author

jo-mut commented Jul 25, 2024

@flexsurfer @ilmotta I think we can do without the functionality of scroll enabled, just like in another parts of the app. When the scolling is not disabled the screen will not reload and the state of the selected contacts is saved on-scroll.

I found enabling and disabling scroll abit confusing for the user, the first instance the list scrolls the second the scroll is disabled and the modal screen would then be closed, the third, the list would scroll and fourth scroll is disabled. I believe this is not the behaviour the user wants and its a bit inconsistent with other places where we are scrolling contacts of even just list items. Most times the user would close the modal screen when they actually intend to just scroll the screen.

I suggest that we merge the pr as is which basically remove enabling and disabling the scroll function for the user to close the screen.

@jo-mut jo-mut force-pushed the fix/contact-screan-reloading-bug branch from b68f387 to 3ab44d7 Compare July 25, 2024 09:50
@ilmotta
Copy link
Contributor

ilmotta commented Jul 25, 2024

@flexsurfer @ilmotta I think we can do without the functionality of scroll enabled, just like in another parts of the app. When the scolling is not disabled the screen will not reload and the state of the selected contacts is saved on-scroll.

I found enabling and disabling scroll abit confusing for the user, the first instance the list scrolls the second the scroll is disabled and the modal screen would then be closed, the third, the list would scroll and fourth scroll is disabled. I believe this is not the behaviour the user wants and its a bit inconsistent with other places where we are scrolling contacts of even just list items. Most times the user would close the modal screen when they actually intend to just scroll the screen.

I suggest that we merge the pr as is which basically remove enabling and disabling the scroll function for the user to close the screen.

It becomes a problem of the lesser of two evils @jo-mut @flexsurfer. I think the bug that resets the selection of contacts is significantly worse than the bug we are now introducing in this PR, thus I think your suggestion to move forward without the bottom sheet scroll behavior is okay.

I'm pretty sure there's a proper solution that keeps the scroll behavior and fix the contact selection, but given our time constraints, fixing contact selection is more important to users in 2.30.

@ajayesivan
Copy link
Contributor

When I scroll down, the contact list reloads and becomes unresponsive for a moment. Is this expected? What exactly happens during that reload?

@ilmotta
Copy link
Contributor

ilmotta commented Jul 26, 2024

When I scroll down, the contact list reloads and becomes unresponsive for a moment. Is this expected? What exactly happens during that reload?

@ajayesivan, from what I tested a few days ago, there seems to be a fundamental problem with the way the code is handling the local state and/or subscription that causes the entire thing to re-render and lose the previous state. This would explain why things appear to refresh.

Do you think this problem is better than the original problem we are solving in the PR? If so, then I think we can merge this PR right away and improve for the next release.

@ajayesivan ajayesivan force-pushed the fix/contact-screan-reloading-bug branch from 3ab44d7 to 74c3818 Compare July 29, 2024 08:22
@ajayesivan
Copy link
Contributor

@ilmotta This is better than the original problem. I suggest we merge this and create a follow-up issue to tackle the re-render problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Contact list reloads when selecting/unselecting contacts (Android)
6 participants