-
Notifications
You must be signed in to change notification settings - Fork 984
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
Connect collectible overview page to backend #17884
Conversation
Jenkins BuildsClick to see older builds (28)
|
a88c738
to
9d53230
Compare
9d53230
to
0bcb28f
Compare
@@ -82,4 +82,7 @@ | |||
"wallet-owned-collectibles-filtering-done" {:fx [[:dispatch | |||
[:wallet/owned-collectibles-filtering-done | |||
event]]]} | |||
"wallet-get-collectibles-details-done" {:fx [[:dispatch |
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.
will it be possible to move this file to status-im2 soon?
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.
Not sure, but anyway I'd rather make it a separate refactoring PR
@@ -4,17 +4,18 @@ | |||
[react-native.core :as rn] | |||
[status-im2.common.scroll-page.view :as scroll-page] | |||
[status-im2.contexts.wallet.collectible.style :as style] | |||
[status-im2.contexts.wallet.common.temp :as temp] |
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.
🙌
[quo/collection-avatar {:image collection-image}] | ||
[rn/view {:style style/collection-container} | ||
[rn/view {:style style/collection-avatar-container} | ||
[quo/collection-avatar {:image collection-image-url}]] |
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.
should we add a container-style
prop to this component? e.g so it can be
[rn/view {:style style/collection-container}
[quo/collection-avatar {
:container-style style/collection-avatar-container
:image collection-image-url}]]
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.
collection-avatar
inside doesn't have additional containers, only fast-image. Also so far it is used only here. So I'd postpone this change until we see that pattern of having external containers emerge.
[rn/flat-list | ||
{:render-fn (fn [{:keys [trait-type value]}] | ||
[rn/view {:style style/traits-item} | ||
[quo/data-item |
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.
I think you can make use of container-style prop on data-item component
(fn [{:keys [trait-type value]}]
[quo/data-item
{:container-style style/traits-item
:description :default
:card? true
:status :default
...
it should already exist 👍
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.
@J-Son89, thanks, good point!
(rf/reg-event-fx :wallet/get-collectible-details | ||
(fn [_ [collectible-id]] | ||
(let [request-id 0 | ||
collectible-id-converted (cske/transform-keys csk/->PascalCaseKeyword collectible-id) | ||
request-params [request-id [collectible-id-converted]]] | ||
{:json-rpc/call [{:method "wallet_getCollectiblesDetailsAsync" | ||
:params request-params | ||
:on-error (fn [error] | ||
(log/error "failed to request collectible" | ||
{:event :wallet/get-collectible-details | ||
:error error | ||
:params request-params}))}]}))) |
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.
Shouldn't the rpc-call
has an :on-success
?
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.
@OmarBasem, this call doesn't return anything immediately, so I just omitted it. Meaningful results will come from signal later.
Also in the code of :json-rpc/call
having :on-success
is not obligatory, it goes under when
clause:
(when on-success
(let [result (if js-response
(.-result response-js)
...
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 call doesn't return anything immediately
I am curious, so when the data finally arrives how is it being handled?
4ec6011
to
3d3b3b7
Compare
69% of end-end tests have passed
Failed tests (10)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Expected to fail tests (4)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (31)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
|
30% of end-end tests have passed
Failed tests (7)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Passed tests (3)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
|
90% of end-end tests have passed
Failed tests (1)Click to expandClass TestCommunityOneDeviceMerged:
Passed tests (9)Click to expandClass TestActivityMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
|
@vkjr failed e2e are not PR related. Ready for merge. |
fixes #17316
Summary
On the collectibles list page you can press any collectible and open its details
Figma designs: https://www.figma.com/file/HKncH4wnDwZDAhc4AryK8Y/Wallet-for-Mobile?type=design&node-id=1355-300904&mode=design&t=Upgum07x1OxZT1AP-4
Existing issues and Followups
Support traits on collectible info page (upgrade to new API) #17936
Traits aren't visible right now. They are supported in this status-go PR, but it crashes with current develop 😠
Support correct network displaying on collectible info page #17937
Network info doesn't work right now because
data-item
component don't have configuration for icon when it is in:network
stateConnect account info on collectible info page to backend #17938
Account info doesn't work because when collectibles fetched for a bunch of addresses, backend doesn't add ownership address to collectible info
status: ready