Skip to content
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

✨ Collection Activity Tab #5345

Merged
merged 68 commits into from
Mar 28, 2023
Merged

Conversation

daiagi
Copy link
Contributor

@daiagi daiagi commented Mar 23, 2023

Thank you for your contribution to the KodaDot NFT gallery.
@yangwao Deliverd on time?
👇 _ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've tested it at </bsx/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

tested on these collections:

  • /rmrk/collection/40BC7893024C43370B-CAPYBARA/activity
  • /rmrk/collection/4A43156FE23E061C03-SNK/activity
  • /bsx/collection/945672150/activity
  • /bsx/collection/2551182625

@daiagi daiagi requested a review from a team as a code owner March 23, 2023 16:02
@daiagi daiagi requested review from roiLeo, Jarsen136 and exezbcz and removed request for a team, roiLeo and Jarsen136 March 23, 2023 16:02
@netlify
Copy link

netlify bot commented Mar 23, 2023

Deploy Preview for koda-nuxt ready!

Name Link
🔨 Latest commit 9f4865d
🔍 Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/6422fddabc26370008dfef83
😎 Deploy Preview https://deploy-preview-5345--koda-nuxt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

components/collection/utils/useCollectionDetails.ts Outdated Show resolved Hide resolved
components/collection/utils/useCollectionDetails.ts Outdated Show resolved Hide resolved
components/collection/utils/useCollectionDetails.ts Outdated Show resolved Hide resolved
components/collection/activity/utils.ts Outdated Show resolved Hide resolved
@exezbcz exezbcz changed the title [don't code review yet - just for exesbcz to look] [don't code review yet - just for exezbcz to look] Mar 23, 2023
@yangwao
Copy link
Member

yangwao commented Mar 23, 2023

looks neat!

IMG_20230323_173452_753.jpg

@daiagi daiagi marked this pull request as draft March 23, 2023 16:42
components/collection/utils/useCollectionDetails.ts Outdated Show resolved Hide resolved
components/collection/utils/useCollectionDetails.ts Outdated Show resolved Hide resolved
components/collection/activity/utils.ts Outdated Show resolved Hide resolved
components/collection/utils/useCollectionActivity.ts Outdated Show resolved Hide resolved
components/collection/utils/useCollectionActivity.ts Outdated Show resolved Hide resolved
components/collection/utils/timeAgo.ts Show resolved Hide resolved
components/collection/utils/timeAgo.ts Show resolved Hide resolved
components/collection/utils/timeAgo.ts Outdated Show resolved Hide resolved
const mintInteraction = events[0]
const mintTimeStamp = new Date(mintInteraction.timestamp).getTime()

owners[nft.currentOwner] =
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vikiival seriously?

components/collection/utils/useCollectionActivity.ts Outdated Show resolved Hide resolved
.flat()
}

const getOwners = (nfts) => {
Copy link

Choose a reason for hiding this comment

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

Function getOwners has 38 lines of code (exceeds 25 allowed). Consider refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vikiival I don't think that there will be anything gained by trying to reduce it farther, same goes for getFlippers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update: managed to reduce getFlippers to 38

@daiagi
Copy link
Contributor Author

daiagi commented Mar 28, 2023

build fails:

image

@preschian
Copy link
Member

build fails:

should be fixed with this #5398

components/collection/activity/Activity.vue Outdated Show resolved Hide resolved
components/collection/activity/events/Events.vue Outdated Show resolved Hide resolved
Comment on lines +126 to +134
.fixed-width {
width: 66px;
}
.fixed-height {
height: 22px;
}
.height-50px {
height: 50px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to set fixed height & width?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

long discussion about this with @exezbcz in discord...
yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

altough fixed height can probably be dropped

Copy link
Contributor

Choose a reason for hiding this comment

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

they look pretty random numbers, wdyt about changing this to inner spacing

Copy link
Member

Choose a reason for hiding this comment

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

is that for the tags? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dropping fixed height causes height diff between desktop and tablet view
i guess min-height could solve it, but what would be the point of that then?

components/collection/activity/ownerInsightsTabs/format.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,122 @@
<template>
<b-collapse
Copy link
Contributor

Choose a reason for hiding this comment

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

NeoCollapse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moving it to the follow up issue with your permission

components/shared/filters/modules/PriceFilter.vue Outdated Show resolved Hide resolved
components/shared/filters/modules/StatusFilter.vue Outdated Show resolved Hide resolved
}


//colors
Copy link
Contributor

Choose a reason for hiding this comment

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

have you seen in styles/abstracts/variables.scss it should do the work you looking for

Copy link
Contributor Author

Choose a reason for hiding this comment

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

honestly i could not figure it out

@codeclimate
Copy link

codeclimate bot commented Mar 28, 2023

Code Climate has analyzed commit 9f4865d and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

View more on Code Climate.

@yangwao
Copy link
Member

yangwao commented Mar 28, 2023

image

@yangwao yangwao merged commit 1d36208 into kodadot:main Mar 28, 2023
@yangwao
Copy link
Member

yangwao commented Mar 28, 2023

Continue @daiagi here

@daiagi
Copy link
Contributor Author

daiagi commented Mar 28, 2023

Continue @daiagi here

Isn't it p4?

@exezbcz
Copy link
Member

exezbcz commented Mar 28, 2023

@daiagi I think this one is the issue we should focus on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection activity tab
7 participants