-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
Jenkins BuildsClick to see older builds (18)
|
sourceModel: root.walletAccountsModel | ||
sorters: [ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! tested
9860aa1
to
bf1fc59
Compare
69705b0
to
713ef3b
Compare
713ef3b
to
f070df5
Compare
There was a problem hiding this 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.
ui/app/AppLayouts/Communities/panels/SharedAddressesAccountSelector.qml
Outdated
Show resolved
Hide resolved
f070df5
to
d2afe5f
Compare
- speed up the construction of the permissions overview panels
There was a problem hiding this 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() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
d2afe5f
to
f3bcae3
Compare
What does the PR do
Fixes #14101
Affected areas
SharedAddressesAccountSelector, SharedAddressesPanel
Screenshot of functionality (including design for comparison)