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

feat: gallery item page view counter #8417

Merged
merged 6 commits into from
Dec 7, 2023
Merged

Conversation

newraina
Copy link
Member

@newraina newraina commented Dec 5, 2023

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

  • 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

Optional

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

Did your issue had any of the "$" label on it?

  • Fill up your DOT address: Payout

Community participation

Screenshot 📸

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

CleanShot 2023-12-05-mTucn29P@2x

Copilot Summary

🤖[deprecated] Generated by Copilot at 4df3a8c

Added a page view count feature to the gallery item component using a new composable function and a counter API. Updated the icons plugin and the utils file with the necessary dependencies and constants.

🤖[deprecated] Generated by Copilot at 4df3a8c

usePageViews sends
route path to counter API
shows eye icon, count

@newraina newraina requested a review from a team as a code owner December 5, 2023 12:01
@newraina newraina requested review from preschian and roiLeo and removed request for a team December 5, 2023 12:01
Copy link

netlify bot commented Dec 5, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 922c2c9
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/65705f288772cf00082a0ad1
😎 Deploy Preview https://deploy-preview-8417--koda-canary.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 configuration.

Copy link
Contributor

reviewpad bot commented Dec 5, 2023

AI-Generated Summary: This pull request introduces a page view counter for items in the gallery. A new file usePageViews.ts is created and utilized in GalleryItem.vue to maintain count of page views. The display of the page view count is integrated with the existing layout of the gallery item, and styling configurations have been updated to accommodate this new feature. Additionally, new constants and icons have been added for support. Page view count requests are made to a new counter URL added in utils/constants.ts.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Dec 5, 2023
Copy link
Contributor

reviewpad bot commented Dec 5, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

every refresh counter is increased maybe it need to check User Agent on worker side

otherwise lgtm ✅

@roiLeo roiLeo added the S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved label Dec 5, 2023
@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Dec 5, 2023
newraina and others added 2 commits December 5, 2023 22:00
Co-authored-by: roiLeo <medina.leo42@gmail.com>
Co-authored-by: roiLeo <medina.leo42@gmail.com>
@exezbcz
Copy link
Member

exezbcz commented Dec 6, 2023

it does not include retrospective views right

otherwise works nicely

  • could you please match the color in light mode to neutral-7, which is the same in dark mode
image image

@newraina newraina requested a review from a team as a code owner December 6, 2023 11:46
Copy link

codeclimate bot commented Dec 6, 2023

Code Climate has analyzed commit 922c2c9 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link

sonarqubecloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.6% 0.6% Duplication

@newraina
Copy link
Member Author

newraina commented Dec 6, 2023

@exezbcz

it does not include retrospective views right

Yes.

could you please match the color in light mode to neutral-7

Done.

To achieve the above, I have updated the neutral color palette in the tailwind config as mentioned in #8137. @roiLeo you may want to review it again. Since the neutral colors stay the same in both light and dark modes, I didn't use CSS variables in the tailwind config.

@yangwao
Copy link
Member

yangwao commented Dec 7, 2023

Thanks!
pay 30 usd

@yangwao
Copy link
Member

yangwao commented Dec 7, 2023

😍 Perfect, I’ve sent the payout
💵 $30 @ 6 USD/DOT ~ 5 $DOT
🧗 1CAv6Zq3yVxL3eKhC94GWTWVwp1w4jZbqeZ6wXx1rPAhrce
🔗 0x9280524f78cc308a4aa009040fadbf1af6c70de5879cafa354b1ef620af44201

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Dec 7, 2023
@yangwao yangwao merged commit d23a5c0 into kodadot:main Dec 7, 2023
@yangwao yangwao mentioned this pull request Dec 7, 2023
@yangwao yangwao mentioned this pull request Dec 7, 2023
@newraina newraina deleted the view-counter branch December 8, 2023 10:36
This was referenced Dec 8, 2023
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 S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants