Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(SharedAddressesAccountSelector): update wallet account sorting #14240

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

caybro
Copy link
Member

@caybro caybro commented Apr 1, 2024

What does the PR do

Fixes #14101

Affected areas

SharedAddressesAccountSelector, SharedAddressesPanel

Screenshot of functionality (including design for comparison)

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

image

@status-im-auto
Copy link
Member

status-im-auto commented Apr 1, 2024

Jenkins Builds

Click to see older builds (18)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 69705b0 #1 2024-04-01 14:39:13 ~6 min macos/aarch64 🍎dmg
✔️ 69705b0 #1 2024-04-01 14:39:43 ~6 min tests/nim 📄log
✔️ 69705b0 #1 2024-04-01 14:42:40 ~9 min macos/x86_64 🍎dmg
✔️ 69705b0 #1 2024-04-01 14:43:37 ~10 min tests/ui 📄log
✔️ 69705b0 #1 2024-04-01 14:50:38 ~17 min linux/x86_64 📦tgz
✔️ 69705b0 #1 2024-04-01 15:02:40 ~29 min windows/x86_64 💿exe
✔️ 713ef3b #2 2024-04-02 10:09:28 ~6 min tests/nim 📄log
✔️ 713ef3b #2 2024-04-02 10:10:38 ~7 min macos/x86_64 🍎dmg
✔️ 713ef3b #2 2024-04-02 10:12:03 ~9 min macos/aarch64 🍎dmg
✔️ 713ef3b #2 2024-04-02 10:14:49 ~12 min tests/ui 📄log
✔️ 713ef3b #2 2024-04-02 10:18:43 ~16 min linux/x86_64 📦tgz
✔️ 713ef3b #3 2024-04-02 10:23:20 ~4 min macos/aarch64 🍎dmg
✔️ f070df5 #4 2024-04-02 10:28:19 ~4 min macos/aarch64 🍎dmg
✔️ f070df5 #4 2024-04-02 10:30:45 ~6 min tests/nim 📄log
✔️ f070df5 #4 2024-04-02 10:34:02 ~10 min macos/x86_64 🍎dmg
✔️ f070df5 #4 2024-04-02 10:34:48 ~10 min tests/ui 📄log
✔️ f070df5 #4 2024-04-02 10:41:58 ~18 min linux/x86_64 📦tgz
✔️ f070df5 #4 2024-04-02 10:53:54 ~29 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d2afe5f #5 2024-04-02 12:15:29 ~6 min tests/nim 📄log
✔️ d2afe5f #5 2024-04-02 12:16:20 ~7 min macos/aarch64 🍎dmg
✔️ d2afe5f #5 2024-04-02 12:18:53 ~9 min macos/x86_64 🍎dmg
✔️ d2afe5f #5 2024-04-02 12:20:10 ~11 min tests/ui 📄log
✔️ d2afe5f #5 2024-04-02 12:22:48 ~13 min linux/x86_64 📦tgz
✔️ d2afe5f #5 2024-04-02 12:38:54 ~29 min windows/x86_64 💿exe
✔️ f3bcae3 #6 2024-04-02 13:21:13 ~5 min macos/aarch64 🍎dmg
✔️ f3bcae3 #6 2024-04-02 13:22:29 ~6 min tests/nim 📄log
✔️ f3bcae3 #6 2024-04-02 13:23:58 ~7 min macos/x86_64 🍎dmg
✔️ f3bcae3 #6 2024-04-02 13:28:13 ~12 min tests/ui 📄log
✔️ f3bcae3 #6 2024-04-02 13:30:48 ~14 min linux/x86_64 📦tgz
✔️ f3bcae3 #6 2024-04-02 13:45:24 ~29 min windows/x86_64 💿exe

sourceModel: root.walletAccountsModel
sorters: [
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing the old sorting code (walletType/position/name) but keeping the SFPM; some other JS code here relies on its .count/.get methods

Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

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

LGTM! tested

@caybro caybro force-pushed the 14101-fix-sort-by-tokens-count branch from 69705b0 to 713ef3b Compare April 2, 2024 10:02
Base automatically changed from feat/issue-14102 to master April 2, 2024 10:18
@caybro caybro force-pushed the 14101-fix-sort-by-tokens-count branch from 713ef3b to f070df5 Compare April 2, 2024 10:23
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.

One minor comment now, review will be continued.

@caybro caybro force-pushed the 14101-fix-sort-by-tokens-count branch from f070df5 to d2afe5f Compare April 2, 2024 12:08
- speed up the construction of the permissions overview panels
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.

LGTM, some minor comments only

@@ -226,6 +257,18 @@ Control {
getCurrencyAmount: function (balance, symbol) {
return root.getCurrencyAmount(balance, symbol)
}

Component.onCompleted: {
const tmpTokenCountMap = new Map()
Copy link
Member

Choose a reason for hiding this comment

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

This make the flow really intertwined but I understand that's workaround for now... Added note to #14140 in order to refactor in the future.

Copy link
Member Author

@caybro caybro Apr 2, 2024

Choose a reason for hiding this comment

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

Yeah, it's not pretty but I couldn't see any other way without completely factoring out the (sub)models construction

- implement sorting of the wallet accounts by the number of tokens (aka tags) and
then by alphabet
- due to the delegate complexity here and usage of nested models, keep
track of the tags count separately and outside of the model
- this will be improved later on as part of the complete sort/order
design described in #14192

Fixes #14101
@caybro caybro force-pushed the 14101-fix-sort-by-tokens-count branch from d2afe5f to f3bcae3 Compare April 2, 2024 13:15
@caybro caybro merged commit cb6c633 into master Apr 2, 2024
8 checks passed
@caybro caybro deleted the 14101-fix-sort-by-tokens-count branch April 2, 2024 14:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update shared accounts popup accounts ordering according tokens count and alphabetically
4 participants