Closed stephenjason89 closed 8 months ago
WARNING @stephenjason89 PR for issue #6941 which isn't assigned to you. Please be warned that this PR may get rejected if there's another assignee for issue #6941
Name | Link |
---|---|
Latest commit | edd67df1176899c7da7f714907fccb9f1c422618 |
Latest deploy log | https://app.netlify.com/sites/koda-canary/deploys/64f73f81f7a26c0008189ef4 |
Deploy Preview | https://deploy-preview-7076--koda-canary.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
AI-Generated Summary: This pull request introduces the feature of listing items in a cart. Changes are made to the file ItemsGridImage.vue
, which now includes new functionalities such as listing items for sale and checking if an item is already in the cart. This is possible through using the store listingCart.ts
. This new file has been added to manage the listings in the cart. It includes definitions for different actions such as setting an item, updating an item, removing an item, and clearing the cart. These functionalities utilize local storage for persistence. A total of 92 lines have been added in this update spread across two files. The purpose of this update is to enhance the userβs shopping experience by keeping track of their potential purchases.
Can we try to test it?
Interesting π€ progress of sizing From small, through medium till largest
@yangwao maybe in 3hours i'll be done Just gonna save the transactions π
hello!
nice job, I will continuously check the pr:
select all should select the cards, giving them the added to list status - blue bg and stroke etc...
this thing should be displayed after at least one item is added:
please check the styling :
clicking floor in the modal does nothing even thought there is the collection floor price :
check dark mode input styling please:
smaller thrash icon here:
otherwise really solid! thank you @stephenjason89, next round soon :D
hello!
nice job, I will continuously check the pr:
otherwise really solid! thank you @stephenjason89, next round soon :D
Thank you @exezbcz for pointing out the dark theme issue. I am glad you liked the layout and everything was good.
Yup all the other functionalities are not yet implemented but I am almost done with it.
Will push a PR in a while.
@exezbcz Please check PR. This is almost final. Will just have to save this on the chain now and i will remove this from draft.
Thank you
- this thing should be displayed after at least one item is added
missing
styling:
left padding for the placeholder please
- this thing should be displayed after at least one item is added
Oh okay, I thought it should always show so a user can do a Select All initially. But yes hiding it is good also, that's what i want to do initially.
missing
styling:
left padding for the placeholder please
noted on this.
@exezbcz & @prury If you could possibly check and test. Waiting for your feedback.
Thank you so much
@yangwao Done, very late here now...
π΄ π πͺ
Goodnight guys!
RMRK 1 and 2 NFTs not loading here for me:
By the way, I am using the floor price returned from the graphql query nftListWithSearch
collection {
id
name
floor
}
- Clicking floor price just sets everything to 0
I believe right now it returns a wrong value. It is returning the lowest value that was set in a collection even if that lowest value was already changed.
I think this is not working as it should @yangwao @roiLeo Please confirm
I would hate to use useCollectionDetails() as this will run another query per collection just to get this information.
RMRK 1 and 2 NFTs not loading here for me:
@prury I might have to re-implement floor
as it is caused by our backend. Data returned was not consistent between chains
Other chains didn't have the floor
available
I'll just use useCollectionDetails() and re-query the information. This is not optimal though.
@prury Please check should be perfect now π
kudos for making it,
yet it seems floor price +5% doesn't work well? It listed bellow π€
ah, confused, it works seems good.
We should auto-fix the decimal point for user?
Probably for follow-up, we can add another OR strategy to add +5% +10% +15% from users buying price.
in this case if buy was 0.6KSM, 15% add up should be 0.69KSM
infinity when no floor and clicking the floor +5% button?
potential earnings not calculating
kudos for making it
Thanks boss β€οΈ
Probably for follow-up, we can add another OR strategy to add +5% +10% +15% from users buying price.
Will do.
We should auto-fix the decimal point for user?
Noted on this, how many decimal places do we need? and do we need to round or just use the toFixed? Also, is this only for the display, what i meant is, for the computation on use floor price or +-5% Should I use the original floor price?
How can i reproduce this?
@exezbcz noted on this. https://github.com/kodadot/nft-gallery/pull/7076#issuecomment-1703819090 Thanks
@roiLeo Thanks for pointing out the css helpers, is there a documentation where i can read more on this? Also it would also be nice if I can see a documentation of our styles & components so I can reuse as much as possible.
hello, some changes I would like to see:
more translated string
Will use the i18n and put up english translation. what languages do you want to include? Is google translate acceptable?
Arrow functions check out other stores to use same function pattern
As much as possible I use arrow functions where I can, though this
Is not possible since the this
context is different, in this case, inside the pinia getters.
Let me explain a bit more
won't work because itemsInChain is a getter
will not work as well because it inherits the this
context
In this method, the this
context is dynamically bound, meaning that when you call count
, this
refers to the object that owns the count method. This will correctly reference itemsInChain getter.
please don't use set when it's not needed
I don't use set
when it is not needed.
I used it inside the listingCart store because I am creating a property and vue doesn't track the properties created on an object on the fly
if we will not use Vue.set another option here is to define the initial property which may cause more lines of code and is not needed in Vue 3
or to replace the whole object which in this case is the state of the pinia store.
I can switch it if we really do not wish to use Vue.set. On vue 3 however, replacing this with Object.assign will be suffice.
But yeah, I'll just refactor it to not use set .
Thank you
@Jarsen136 Thanks I will try to use more of the es6 forEach
Thank you everyone for commenting and suggesting things for improvement. I appreciate all of your time and effort to check my PR β€οΈ
How can i reproduce this?
One input used ,
, one .
, but probably we should handle it globally iirc
Hello everyone I have finished everything here. @exezbcz only thing i can't reproduce is the infinity, but i changed it a bit so please let me know if it still happens.
@yangwao I have reimplemented how +-5% works. Please let me know if you like it this way instead. You can recursively add more 5% or less 5%
By the way @yangwao
we need to correct this on the backend, if it's possible that we can return a correct floor value for all chains then we won't need to requery for every collection using useCollectionDetails()
I believe this is redundant.
collection {
id
name
floor
}
Also, i used the default settings of formatBalance which is 4 decimal places.
we need to correct this on the backend, if it's possible that we can return a correct floor value for all chains then we won't need to requery for every collection using useCollectionDetails() I believe this is redundant.
Can you rephrase your question please? @stephenjason89
we need to correct this on the backend, if it's possible that we can return a correct floor value for all chains then we won't need to requery for every collection using useCollectionDetails() I believe this is redundant.
Can you rephrase your question please? @stephenjason89
for example in the graphql query
It would be nice to return floor here for every chain. So that in the front-end we can just use this directly instead of using the composable
const { stats } = useCollectionDetails({
collectionId: props.nft?.collection?.id || props.nft?.collectionId,
})
then using stats.value.collectionFloorPrice
Right now, only the
can return floor
but it is the wrong floor value so we also need to check this.
Example returned data with floor
for RMRK1 / 2 and the others it doesn't have a floor
field so it will throw a graphql error on this
This causes to have 1 more query per collection. Which we could have avoided if it was already returned by the first query.
for RMRK1 / 2 and the others it doesn't have a floor field so it will throw a graphql error on this
Well the only indexer that does not have floor is ksm
that is blocked by - https://github.com/kodadot/nft-gallery/issues/5853
https://squid.subsquid.io/marck/v/v3/graphql
rmrk
has floor just we need to update indexer to newer version π
https://squid.subsquid.io/rubick/v/v9/graphql
for RMRK1 / 2 and the others it doesn't have a floor field so it will throw a graphql error on this
Well the only indexer that does not have floor is
ksm
that is blocked by - https://github.com/kodadot/nft-gallery/issues/5853
Oh was rmrk recently added?
https://github.com/kodadot/nft-gallery/pull/7076#issuecomment-1703277279 It was throwing an error a few days ago Didn't try today.
https://squid.subsquid.io/marck/v/v3/graphql
rmrk
has floor just we need to update indexer to newer version πhttps://squid.subsquid.io/rubick/v/v9/graphql
Got it.
But you have to check it, It is incorrectly returning the floor value. It returns the lowest value that was listed on the collection but if i change the lowest value to something higher then the query still returns the lowest value that was ever set before.
Example Collection 1 has Nft 1 - price 1.89 Nft 2 - price 3.5 Nft 3 - price 4.6
The floor is 1.89
But if i change nft 1 price to 5.5
It will still return floor 1.89 When it should be 3.5 now
If you lower the price of nft 1 to 0.5
Then floor correctly gives me 0.5
Is this bug happenning on all indexers or just rmrk or ksm
If so please open the issue For all: kodadot/loligo For ksm/rmrk: kodadot/rubick
I try to find time to fix it or can guide.
Edit: most probably i know where is the the issue.
If so please open the issue For all: kodadot/loligo For ksm/rmrk: kodadot/rubick
I try to find time to fix it or can guide.
I would love to try and fix it, please guide me. I'll open an issue later.
getting close mainly missing translations
Everything's added now. Please check. Thank you so much!
same issue as #7121
@daiagi this is how it looks on my end on the latest deployment
How can i replicate that issue? Have you tried clearing your cache?
this is how it looks on my end on the latest deployment
don't worry about it, it is dealt with in #7121. I've just linked it here so prury or execbcz know that it isn't from this pr
Code Climate has analyzed commit edd67df1 and detected 0 issues on this pull request.
View more on Code Climate.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
3 Code Smells
No Coverage information
0.0% Duplication
I think it's time for merge, and we can do followups. π
I think it's time for merge, and we can do followups. π
Yeah haha let's do this π Most of the code changes were code style, syntax, global css helpers, and translations.
I think we've addressed everything already π
Alright. Thank you for your patience with the extended reviews Let it roll
pay 100 usd
π Perfect, Iβve sent the payout π΅ $100 @ 4.23 USD/DOT ~ 23.641 $DOT π§ 13rFRPVKjJzQXVC8ZqHZv5YMmwmk4MU7z4HeYk218hEMpQXH π 0xe879ce52e338193cf5881d94ccab1c2a1201cdd790318ab3a6d74254a931eed8
πͺ Letβs grab another issue and get rewarded! πͺ github.com/kodadot/nft-gallery/issues
Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
π __ Let's make a quick check before the contribution.
PR Type
Context
Before submitting pull request, please make sure:
Optional
Did your issue had any of the "$" label on it?
Community participation
Screenshot πΈ
Copilot Summary
π€ Generated by Copilot at 0c66f2c
This pull request implements a listing cart feature for NFT owners who want to sell their items. It adds a new
stores/listingCart
module that defines a Pinia store for managing the cart state and actions, and uses local storage for persistence. It also modifies theItemsGridImage
component to display a button for adding items to the cart.π€ Generated by Copilot at 0c66f2c