-
Notifications
You must be signed in to change notification settings - Fork 90
feat!: a new token list approach #18965
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
Conversation
Jenkins BuildsClick to see older builds (582)
|
5b2deb1 to
a814eb4
Compare
475b5a4 to
cde8469
Compare
436c456 to
4bf30f0
Compare
c5c43c8 to
f8b2bfc
Compare
0f34a00 to
6d9de92
Compare
677d1f5 to
0786ddf
Compare
micieslak
left a comment
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.
Huge work! LGTM in general, just some things regarding code structure I think are easy and worth to do imo. Plus some other really minor comments.
| e => { accounts.add(e.accountAddress) })) | ||
|
|
||
| accountsSelector.model = [...accounts.values()] | ||
| Qt.callLater(() => { |
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.
Hmm, why is this callLater needed here?
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.
@micieslak if the last opened page in the Storybook was CollectiblesSelectionAdaptor without callLater the Storybook crashes, cause Component.onCompleted is accessing accountsSelector before it is initialized.
| @@ -1,11 +1,74 @@ | |||
| import QtQuick | |||
|
|
|||
| import StatusQ.Core.Utils | |||
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.
Please keep all stubs empty, just plain QtObject {}. If it's necessary to share some stub implementation among multiple SB pages or tests, create implementation under storybook/mocks, by inheriting from the store type`, like
import AppLayouts.Wallet.stores
TokenStore {
/* impl there */`
}This approach has some advantages, described in guideline. And will allow for further improvements in the future when all stubs are refactored to that form.
| const token = SQUtils.ModelUtils.getByKey(d.selectedHolding.item.tokens, "chainId", root.selectedNetworkChainId) | ||
| return token.key |
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.
| const token = SQUtils.ModelUtils.getByKey(d.selectedHolding.item.tokens, "chainId", root.selectedNetworkChainId) | |
| return token.key | |
| return SQUtils.ModelUtils.getByKey(d.selectedHolding.item.tokens, "chainId", root.selectedNetworkChainId, "key") |
| sectionName (optional) [string] - text to be rendered as a section | ||
| **/ | ||
| property alias model: sfpm.sourceModel | ||
| property var model |
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.
Please update the model description instead of removing it :)
| return | ||
| } | ||
|
|
||
| let entry = SQUtils.ModelUtils.getByKey( |
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.
const
f533577 to
9f2f8fe
Compare
|
@micieslak will prepare a separate PR tomorrow addressing your comments.
@caybro true, but that's not mandatory, since there are some issues in building them. There are also issues with windows build, but doesn't mean we should not merge this, since it's in the middle of the merging process (statusgo was already merged today).
@anastasiyaig yes, but Alex's PR should help, will see in a bit, I just rebased. |
3a2223f to
9f2f8fe
Compare
|
@siddarthkay I've seen your commit |
|
@alexjba : yeah i removed that commit from this PR, I'm doing that bit in a separate branch. |
|
windows CI is fixed here : #19537 |
Instead of using all tokens (atm there are ~15k unique tokens that the app operates with) in all parts of the app, a new token list, containing only tokens of interest, is being used. There is also a new list containing all tokens introduced that will be used in places where we really need all tokens, like drop-down list for Swap.
…ng and faster search - Introduced new model modes to token selector adapter for handling token groups, including lazy loading and search results. - Updated the TokenGroupsModel to support lazy loading of items and improved search functionality. - Refactored the UI components to utilize the new models, improving UX when dealing with large token models. - Loading indicator and debounce mechanisms added for search inputs to optimize performance.
9f2f8fe to
d3e93ce
Compare
✔️ status-desktop/prs/linux/x86_64/tests-nim/PR-18965#71 🔹 ~9 min 52 sec 🔹 d3e93ce 🔹 📦 tests/nim package |
✔️ status-desktop/e2e/prspr18965 🔹 ~15 min 🔹 d3e93ce 🔹 📦 tests/e2e package |
|
@micieslak your comments are addressed in this PR #19561 please have a look. |
Depends on: