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: Optimize ContactsView & MembersTabPanel settings pages #16979

Merged
merged 5 commits into from
Jan 14, 2025

Conversation

caybro
Copy link
Member

@caybro caybro commented Dec 18, 2024

Tip

Best review commit by commit; the first 2 contain UI components updates. Also, a lot of the new stuff is Storybook pages :)

What does the PR do

  • removed nested ListViews inside StackLayouts, in order to reduce the memory footprint and improve performance, and also to be able to better manage the scrolling
  • no more unrolled multiple listviews, which again hurt the performance; now the views instantiate the delegates dynamically on the fly
  • the tab bar and the search fields now stick to the top of the page, with the users list view scrolling independently
  • both views now uniformly use the common ContactListItemDelegate
  • the received/sent CRs are now combined into one pendingContacts model
  • factored out common search/filter criteria into a new, separate SFPM UserFilterContainer component
  • fix an issue where StatusContactVerificationIcons wasn't properly displaying the "blocked" state/icon
  • fix documentation comments, removed relative imports, and updated some
  • separate commits for Status Controls UI updates & fixes

Fixes #16612
Fixes #16958

Affected areas

Settings/Contacts; Community/Settings/Members

Architecture compliance

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it

Contacts:
image

Community members:
image

image

image

image

image

@caybro caybro linked an issue Dec 18, 2024 that may be closed by this pull request
@status-im-auto
Copy link
Member

status-im-auto commented Dec 18, 2024

Jenkins Builds

Click to see older builds (96)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 6e4620a #1 2024-12-18 19:57:47 ~6 min macos/aarch64 🍎dmg
✔️ 6e4620a #1 2024-12-18 19:59:17 ~8 min tests/nim 📄log
✔️ 6e4620a #1 2024-12-18 20:02:50 ~11 min tests/ui 📄log
✔️ dd6550f #4 2024-12-18 20:13:38 ~4 min macos/aarch64 🍎dmg
✔️ dd6550f #4 2024-12-18 20:16:40 ~7 min tests/nim 📄log
✔️ dd6550f #4 2024-12-18 20:20:13 ~11 min tests/ui 📄log
✔️ dd6550f #4 2024-12-18 20:25:09 ~16 min macos/x86_64 🍎dmg
✔️ dd6550f #4 2024-12-18 20:28:01 ~18 min linux-nix/x86_64 📦tgz
✔️ dd6550f #4 2024-12-18 20:30:30 ~21 min windows/x86_64 💿exe
✔️ dd6550f #4 2024-12-18 20:31:51 ~22 min linux/x86_64 📦tgz
✔️ 7a700b7 #5 2024-12-19 11:32:43 ~4 min macos/aarch64 🍎dmg
✔️ 7a700b7 #5 2024-12-19 11:35:51 ~7 min tests/nim 📄log
✔️ 7a700b7 #5 2024-12-19 11:39:13 ~11 min tests/ui 📄log
✔️ 7a700b7 #5 2024-12-19 11:40:57 ~12 min macos/x86_64 🍎dmg
✔️ 7a700b7 #5 2024-12-19 11:44:48 ~16 min linux-nix/x86_64 📦tgz
✔️ 7a700b7 #5 2024-12-19 11:48:52 ~20 min windows/x86_64 💿exe
✔️ 7a700b7 #5 2024-12-19 11:50:44 ~22 min linux/x86_64 📦tgz
✔️ 285991f #6 2024-12-19 16:31:00 ~4 min macos/aarch64 🍎dmg
✔️ 285991f #6 2024-12-19 16:33:59 ~7 min tests/nim 📄log
✔️ 285991f #6 2024-12-19 16:37:26 ~11 min tests/ui 📄log
✔️ 285991f #6 2024-12-19 16:40:12 ~13 min macos/x86_64 🍎dmg
✔️ 285991f #6 2024-12-19 16:42:19 ~16 min linux-nix/x86_64 📦tgz
✔️ 285991f #6 2024-12-19 16:45:50 ~19 min windows/x86_64 💿exe
✔️ 285991f #6 2024-12-19 16:46:53 ~20 min linux/x86_64 📦tgz
✔️ 03f9af4 #7 2024-12-19 16:53:03 ~5 min macos/aarch64 🍎dmg
✔️ 03f9af4 #7 2024-12-19 16:55:33 ~7 min tests/nim 📄log
03f9af4 #7 2024-12-19 16:59:17 ~11 min tests/ui 📄log
✔️ 03f9af4 #7 2024-12-19 17:02:24 ~14 min macos/x86_64 🍎dmg
✔️ 03f9af4 #7 2024-12-19 17:04:18 ~16 min linux-nix/x86_64 📦tgz
✔️ 03f9af4 #7 2024-12-19 17:07:02 ~19 min windows/x86_64 💿exe
✔️ 03f9af4 #7 2024-12-19 17:09:08 ~21 min linux/x86_64 📦tgz
✔️ 03f9af4 #8 2024-12-19 23:13:12 ~11 min tests/ui 📄log
✔️ 55747bf #8 2024-12-19 23:32:05 ~4 min macos/aarch64 🍎dmg
✔️ 55747bf #8 2024-12-19 23:34:43 ~7 min tests/nim 📄log
✔️ 55747bf #9 2024-12-19 23:39:33 ~12 min tests/ui 📄log
✔️ 55747bf #8 2024-12-19 23:40:48 ~13 min macos/x86_64 🍎dmg
✔️ 55747bf #8 2024-12-19 23:45:20 ~18 min linux-nix/x86_64 📦tgz
✔️ 55747bf #8 2024-12-19 23:46:47 ~19 min windows/x86_64 💿exe
✔️ 55747bf #8 2024-12-19 23:48:47 ~21 min linux/x86_64 📦tgz
✔️ 2052cd3 #9 2024-12-20 10:55:37 ~5 min macos/aarch64 🍎dmg
✔️ 2052cd3 #9 2024-12-20 10:57:27 ~7 min tests/nim 📄log
✔️ 2052cd3 #10 2024-12-20 11:01:34 ~11 min tests/ui 📄log
✔️ 2052cd3 #9 2024-12-20 11:04:57 ~15 min linux-nix/x86_64 📦tgz
✔️ 2052cd3 #9 2024-12-20 11:05:07 ~15 min macos/x86_64 🍎dmg
✔️ 2052cd3 #9 2024-12-20 11:07:52 ~17 min linux/x86_64 📦tgz
✔️ 2052cd3 #9 2024-12-20 11:08:51 ~18 min windows/x86_64 💿exe
✔️ 77975e9 #10 2024-12-20 12:32:51 ~5 min macos/aarch64 🍎dmg
✔️ 77975e9 #10 2024-12-20 12:35:23 ~7 min tests/nim 📄log
✔️ 77975e9 #11 2024-12-20 12:38:41 ~11 min tests/ui 📄log
✔️ 77975e9 #10 2024-12-20 12:40:44 ~13 min macos/x86_64 🍎dmg
✔️ 77975e9 #10 2024-12-20 12:43:25 ~15 min linux-nix/x86_64 📦tgz
✔️ 77975e9 #10 2024-12-20 12:45:38 ~18 min linux/x86_64 📦tgz
✔️ 77975e9 #10 2024-12-20 12:46:40 ~18 min windows/x86_64 💿exe
✔️ fe50257 #11 2024-12-20 16:08:46 ~4 min macos/aarch64 🍎dmg
✔️ fe50257 #11 2024-12-20 16:11:55 ~7 min tests/nim 📄log
fe50257 #12 2024-12-20 16:15:22 ~11 min tests/ui 📄log
✔️ fe50257 #11 2024-12-20 16:18:20 ~14 min macos/x86_64 🍎dmg
✔️ fe50257 #11 2024-12-20 16:21:39 ~17 min linux-nix/x86_64 📦tgz
✔️ fe50257 #11 2024-12-20 16:22:37 ~18 min windows/x86_64 💿exe
✔️ fe50257 #11 2024-12-20 16:26:19 ~22 min linux/x86_64 📦tgz
fe50257 #13 2024-12-20 16:48:55 ~11 min tests/ui 📄log
✔️ fe50257 #14 2024-12-20 17:56:44 ~12 min tests/ui 📄log
✔️ 6c476aa #12 2024-12-20 19:30:27 ~4 min macos/aarch64 🍎dmg
✔️ 6c476aa #12 2024-12-20 19:33:22 ~7 min tests/nim 📄log
✔️ 6c476aa #15 2024-12-20 19:37:57 ~12 min tests/ui 📄log
✔️ 6c476aa #12 2024-12-20 19:40:19 ~14 min macos/x86_64 🍎dmg
✔️ 6c476aa #12 2024-12-20 19:43:53 ~18 min windows/x86_64 💿exe
✔️ 6c476aa #12 2024-12-20 19:44:11 ~18 min linux-nix/x86_64 📦tgz
✔️ 6c476aa #12 2024-12-20 19:46:37 ~20 min linux/x86_64 📦tgz
✔️ 3393297 #13 2024-12-23 13:30:58 ~4 min macos/aarch64 🍎dmg
✔️ 3393297 #13 2024-12-23 13:33:58 ~7 min tests/nim 📄log
✔️ 3393297 #16 2024-12-23 13:37:49 ~11 min tests/ui 📄log
✔️ 3393297 #13 2024-12-23 13:43:18 ~17 min linux-nix/x86_64 📦tgz
✔️ 3393297 #13 2024-12-23 13:46:12 ~19 min windows/x86_64 💿exe
✔️ 3393297 #13 2024-12-23 13:46:30 ~20 min macos/x86_64 🍎dmg
✔️ 3393297 #13 2024-12-23 13:48:57 ~22 min linux/x86_64 📦tgz
✔️ 088fc8f #14 2025-01-07 17:59:58 ~5 min macos/aarch64 🍎dmg
✔️ 088fc8f #14 2025-01-07 18:02:19 ~7 min tests/nim 📄log
✔️ 088fc8f #17 2025-01-07 18:06:04 ~11 min tests/ui 📄log
✔️ 088fc8f #14 2025-01-07 18:09:35 ~14 min macos/x86_64 🍎dmg
✔️ 088fc8f #14 2025-01-07 18:12:51 ~18 min linux-nix/x86_64 📦tgz
✔️ 088fc8f #14 2025-01-07 18:15:07 ~20 min windows/x86_64 💿exe
✔️ f0809e6 #15 2025-01-07 18:20:18 ~4 min macos/aarch64 🍎dmg
✔️ f0809e6 #15 2025-01-07 18:23:12 ~7 min tests/nim 📄log
✔️ f0809e6 #18 2025-01-07 18:27:45 ~11 min tests/ui 📄log
✔️ f0809e6 #15 2025-01-07 18:28:27 ~12 min macos/x86_64 🍎dmg
✔️ f0809e6 #15 2025-01-07 18:33:20 ~17 min linux-nix/x86_64 📦tgz
✔️ f0809e6 #15 2025-01-07 18:33:58 ~18 min windows/x86_64 💿exe
✔️ f0809e6 #15 2025-01-07 18:38:09 ~22 min linux/x86_64 📦tgz
✔️ 9b0cca1 #16 2025-01-10 10:52:21 ~8 min macos/aarch64 🍎dmg
✔️ 9b0cca1 #16 2025-01-10 10:53:13 ~9 min tests/nim 📄log
✔️ 9b0cca1 #19 2025-01-10 10:56:53 ~12 min tests/ui 📄log
✔️ 9b0cca1 #16 2025-01-10 11:02:45 ~18 min linux/x86_64 📦tgz
✔️ 9b0cca1 #16 2025-01-10 11:03:06 ~19 min linux-nix/x86_64 📦tgz
✔️ 9b0cca1 #16 2025-01-10 11:03:15 ~19 min macos/x86_64 🍎dmg
✔️ 9b0cca1 #16 2025-01-10 11:05:11 ~21 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ bff2a49 #17 2025-01-13 09:18:50 ~5 min macos/aarch64 🍎dmg
✔️ bff2a49 #17 2025-01-13 09:22:19 ~8 min tests/nim 📄log
bff2a49 #20 2025-01-13 09:26:25 ~13 min tests/ui 📄log
✔️ bff2a49 #17 2025-01-13 09:28:58 ~15 min macos/x86_64 🍎dmg
✔️ bff2a49 #17 2025-01-13 09:32:06 ~18 min linux-nix/x86_64 📦tgz
✔️ bff2a49 #17 2025-01-13 09:32:58 ~19 min linux/x86_64 📦tgz
✔️ bff2a49 #17 2025-01-13 09:35:12 ~21 min windows/x86_64 💿exe
✔️ b78e369 #18 2025-01-13 10:14:48 ~5 min macos/aarch64 🍎dmg
✔️ b78e369 #18 2025-01-13 10:18:54 ~9 min tests/nim 📄log
✔️ b78e369 #21 2025-01-13 10:21:40 ~12 min tests/ui 📄log
✔️ b78e369 #18 2025-01-13 10:21:50 ~12 min macos/x86_64 🍎dmg
✔️ b78e369 #18 2025-01-13 10:27:08 ~17 min linux-nix/x86_64 📦tgz
✔️ b78e369 #18 2025-01-13 10:28:50 ~19 min linux/x86_64 📦tgz
✔️ b78e369 #18 2025-01-13 10:29:00 ~19 min windows/x86_64 💿exe

@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch 2 times, most recently from d0e8549 to dd6550f Compare December 18, 2024 20:08
@caybro caybro changed the title 16612 settings optimize contactsview settings page fix: Optimize ContactsView & MembersTabPanel settings pages Dec 19, 2024
@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch 3 times, most recently from 285991f to 03f9af4 Compare December 19, 2024 16:47
@caybro caybro marked this pull request as ready for review December 19, 2024 16:47
@caybro caybro requested review from micieslak, a team and alexjba as code owners December 19, 2024 16:47
@jrainville
Copy link
Member

I did some quick tests on the Status Community.

The performance looks fine.

The only issue I found is that the Banned list is empty
image

I tried master and it works fine, so there is a small broken thing there

@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch from 03f9af4 to 55747bf Compare December 19, 2024 23:27
@caybro
Copy link
Member Author

caybro commented Dec 19, 2024

I did some quick tests on the Status Community.

The performance looks fine.

The only issue I found is that the Banned list is empty image

I tried master and it works fine, so there is a small broken thing there

Ah great, good spot! Wrong enum, fixed :)

@anastasiyaig
Copy link
Contributor

anastasiyaig commented Dec 20, 2024

@caybro i will fix the tests, looking into that now. Just one question: was the second checkbox changed to be not a checkbox on purpose?

image

@caybro
Copy link
Member Author

caybro commented Dec 20, 2024

@caybro i will fix the tests, looking into that now. Just one question: was the second checkbox changed to be not a checkbox on purpose?

image

Oh definitely not and I have no idea what happened here, will check

@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch from 55747bf to 2052cd3 Compare December 20, 2024 10:49
@caybro
Copy link
Member Author

caybro commented Dec 20, 2024

@caybro i will fix the tests, looking into that now. Just one question: was the second checkbox changed to be not a checkbox on purpose?

Oh definitely not and I have no idea what happened here, will check

And fixed :)

@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch from 2052cd3 to 77975e9 Compare December 20, 2024 12:27
@anastasiyaig anastasiyaig force-pushed the 16612-settings-optimize-contactsview-settings-page branch 2 times, most recently from 6c476aa to 3393297 Compare December 23, 2024 13:25
@jrainville
Copy link
Member

A small bug I found is that the checkboxes don't seem correct in the Edit community panel. There is a weird "selected" effect on the first two letters and the checkboxes don't show (on the right maybe)

image

The button to save the edit doesn't appear either.

The member lists seem to work fine. but I couldn't test the pending members because of the above bugs

@caybro
Copy link
Member Author

caybro commented Jan 6, 2025

A small bug I found is that the checkboxes don't seem correct in the Edit community panel. There is a weird "selected" effect on the first two letters and the checkboxes don't show (on the right maybe)

image

The button to save the edit doesn't appear either.

The member lists seem to work fine. but I couldn't test the pending members because of the above bugs

Ah thanks, will have a look tomorrow!

@caybro
Copy link
Member Author

caybro commented Jan 6, 2025

A small bug I found is that the checkboxes don't seem correct in the Edit community panel. There is a weird "selected" effect on the first two letters and the checkboxes don't show (on the right maybe)
image
The button to save the edit doesn't appear either.
The member lists seem to work fine. but I couldn't test the pending members because of the above bugs

Ah thanks, will have a look tomorrow!

Looks a similar prob to what Nastya found above; should be an easy fix

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

Nice work! I wrote a couple of questions and suggestions, but nothing blocking

@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch 2 times, most recently from 088fc8f to f0809e6 Compare January 7, 2025 18:15
@caybro caybro requested a review from jrainville January 7, 2025 18:15
@caybro
Copy link
Member Author

caybro commented Jan 7, 2025

@jrainville addressed your feedback, and fixed the issue with checkboxes; pls have a second look 🙏

@jrainville
Copy link
Member

On the tester side, everything works as expected, except a small bug with rejecting a request, but I tested it on master and the issue happens there too, so I'll open a new issue.

Anyway, tested ✔️

- fixup margins and padding according to latest Figma designs
- make a difference between a disabled and inactive tab by using opacity
- provide smooth color transitions
- add a dedicated StoryBook page
- fix a bug where the Switch would start animating if it'd been checked
on creation
- add the same property `leftSide` to StatusSwitch (just like
StatusCheckBox), and use `LayoutMirroring` to perform the visual
inversion
- fixup margins and padding, removing hardcoded values, according to
latest Figma designs
- make a difference between a disabled and inactive button by using opacity
- provide smooth color transitions
- add dedicated StoryBook pages
- removed nested ListViews inside StackLayouts, in order to reduce the
memory footprint and improve performance, and also to be able to better
manage the scrolling
- no more unrolled multiple listviews, which again hurt the performance;
now the views instantiate the delegates dynamically on the fly
- the tab bar and the search fields now stick to the top of the page,
with the users list view scrolling independently
- both views now uniformly use the common `ContactListItemDelegate`
- the received/sent CRs are now combined into one `pendingContacts`
model
- factored out common search/filter criteria into a new, separate SFPM
`UserFilterContainer` component
- fix an issue where StatusContactVerificationIcons wasn't properly
displaying the "blocked" state/icon
- fix documentation comments, removed relative imports, and updated some

Fixes #16612
Fixes #16958
@caybro caybro force-pushed the 16612-settings-optimize-contactsview-settings-page branch from f0809e6 to 9b0cca1 Compare January 10, 2025 10:43
Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

Great job, finally fixing something that hurt my eyes every time I looked at it ;)

There is one thing that could be changed to improve behavior and simplify code, details in the comments (mainly #16979 (comment)).

storybook/pages/ContactsViewPage.qml Show resolved Hide resolved
storybook/pages/ContactsViewPage.qml Outdated Show resolved Hide resolved
ui/imports/shared/UserSearchFilterContainer.qml Outdated Show resolved Hide resolved
ui/imports/shared/UserSearchFilterContainer.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml Outdated Show resolved Hide resolved
interactive: false
model: SortFilterProxyModel {
id: filteredModel
objectName: "ContactListPanel_ListView"
Copy link
Member

Choose a reason for hiding this comment

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

Detail: it's good practice to not set the objectName at the top level. Please set in a place where ContactListPanel is instantiated.

ui/app/AppLayouts/Profile/views/ContactsView.qml Outdated Show resolved Hide resolved
@micieslak micieslak force-pushed the 16612-settings-optimize-contactsview-settings-page branch from 9b0cca1 to bff2a49 Compare January 13, 2025 09:13
@micieslak micieslak force-pushed the 16612-settings-optimize-contactsview-settings-page branch from bff2a49 to b78e369 Compare January 13, 2025 10:09
@micieslak
Copy link
Member

micieslak commented Jan 13, 2025

I added additional commit addressing my review comments. @caybro @jrainville please re-test. It brings several simplifications making the code shorter and changes the behavior I mentioned earlier (tabs are stateful now). It may be still needed to adjust e2e test.

@jrainville
Copy link
Member

App still works as expected and I can confirm that the list keeps the state when switching from one tab to the other!

@caybro caybro merged commit 97a40fb into master Jan 14, 2025
9 checks passed
@caybro caybro deleted the 16612-settings-optimize-contactsview-settings-page branch January 14, 2025 09:32
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.

Community admin members list - Add copy for no search results Settings: Optimize ContactsView settings page
5 participants