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: Top collections - landing page v3 #9336

Merged
merged 32 commits into from
Feb 14, 2024
Merged

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Feb 9, 2024

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Needs Design check

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

  • Fill up your DOT address: Payout

Screenshot 📸

  • My fix has changed something on UI;

CleanShot 2024-02-11 at 10 38 51@2x

@kodabot
Copy link
Collaborator

kodabot commented Feb 9, 2024

SUCCESS @hassnian PR for issue #9309 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

Copy link

netlify bot commented Feb 9, 2024

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 6ddc7ca
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/65cb2fda63e9c30008573ddb
😎 Deploy Preview https://deploy-preview-9336--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.

@hassnian hassnian marked this pull request as ready for review February 10, 2024 11:12
@hassnian hassnian requested a review from a team as a code owner February 10, 2024 11:12
@hassnian hassnian requested review from preschian and roiLeo and removed request for a team February 10, 2024 11:12
@hassnian
Copy link
Contributor Author

hassnian commented Feb 10, 2024

no fancy layout

talked with @exezbcz on telegram lets make it generic layout

@hassnian
Copy link
Contributor Author

also can we change the default time range to 30 days ?

I think makes more sense otherwise the floor price diff is 0

CleanShot 2024-02-10 at 16 19 43@2x

CleanShot 2024-02-10 at 16 21 47@2x

@exezbcz
Copy link
Member

exezbcz commented Feb 10, 2024

@hassnian sure

@hassnian hassnian marked this pull request as draft February 11, 2024 02:25
Copy link
Member

Choose a reason for hiding this comment

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

would be good if we can delete this file

@@ -0,0 +1,37 @@
.top-collection-card,
Copy link
Member

Choose a reason for hiding this comment

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

Create a shared component instead of shared scss files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done pls check

Copy link
Member

Choose a reason for hiding this comment

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

prefer something like this, then we can inline tailwind classes

<template>
  <div
    class="top-collection-card w-full border border-card-border-color hover:border-border-color bg-background-color group">
    <nuxt-link
      class="flex flex-col hover:text-text-color"
      rel="nofollow noopener noreferrer"
      :to="`${collection?.id && `/${urlPrefix}/collection/${collection.id}`}`">
      <div
        class="top-collection-card-banner group-hover:opacity-[0.85] bg-center bg-cover"
        :style="{ backgroundImage: `url(${collection?.image})` }"
        :class="`${!collection && 'bg-k-shade animate-pulse'}`">
        <div class="top-collection-card-banner-avatar-container">
          <BasicImage
            custom-class="top-collection-card-banner-avatar-inner [&>img]:border [&>img]:border-card-border-color !p-0"
            :src="collection?.image || placeholder" />
        </div>
      </div>

      <div class="top-collection-card-info border-t border-card-border-color">
        <p
          class="collection-name font-bold text-base whitespace-nowrap text-center truncate">
          <span v-if="collection?.name">{{ collection.name }}</span>
          <span v-else class="inline-block">
            <NeoSkeleton no-margin :rounded="false" width="160" height="24" />
          </span>
        </p>

        <div class="info-fields">
          <div>
            <p class="capitalize text-k-grey text-xs">
              <span v-if="collection?.floorPrice || collection?.floor">
                {{ $t('price') }}
              </span>
              <NeoSkeleton
                v-else
                no-margin
                :rounded="false"
                width="40"
                height="12" />
            </p>

            <div
              v-if="collection?.floorPrice || collection?.floor"
              class="flex gap-2 items-center max-md:flex-row-reverse">
              <CommonTokenMoney
                :value="collection.floorPrice || collection.floor"
                inline
                :round="2" />

              <div v-if="formattedDiffPercent" :class="color" class="text-xs">
                {{ formattedDiffPercent }}
              </div>
            </div>
            <NeoSkeleton
              v-else
              no-margin
              :rounded="false"
              width="80"
              height="20"
              class="mt-1" />
          </div>

          <div>
            <p class="capitalize text-k-grey text-end text-xs">
              <span v-if="collection">{{ $t('volume') }}</span>
              <NeoSkeleton
                v-else
                no-margin
                :rounded="false"
                width="40"
                height="12" />
            </p>
            <div class="flex gap-2 items-center">
              <CommonTokenMoney
                v-if="collection"
                :value="volume"
                inline
                :round="1" />
              <NeoSkeleton
                v-else
                no-margin
                :rounded="false"
                width="80"
                height="20" />
            </div>
          </div>
        </div>
      </div>
    </nuxt-link>
  </div>
</template>

Copy link
Member

Choose a reason for hiding this comment

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

that one is TopCollectionsCard component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah much cleaner, let me fix it

Copy link
Contributor Author

@hassnian hassnian Feb 13, 2024

Choose a reason for hiding this comment

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

fixed 1b02f8f

@prury
Copy link
Member

prury commented Feb 12, 2024

@prury don't know if this affects any of your tests

it does not, ty

@prury
Copy link
Member

prury commented Feb 12, 2024

this pr does change the number of cols that are created on other grids like , nft grid and collection grid (check between canary and this pr you'll see the difference)

indeed, for me it changed explore-items:

explore-items.mp4

edit: other than the mentioned above(also affects profile), works for me, not sure of how problematic it is, wdyt @exezbcz ?

@exezbcz
Copy link
Member

exezbcz commented Feb 12, 2024

deploy:

image

canary:

image

prev it didn't take the column gaps into consideration when calculating the amount of cols

if we will get more precise columns and cards that don't drop below the minimum width, I am for it!

@exezbcz
Copy link
Member

exezbcz commented Feb 13, 2024

green check for me! good job

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.

No a fan of DynamicGrid js, should be doable with only css but can be in a follow up.

otherwise lgtm

components/landing/topCollections/TopCollections.vue Outdated Show resolved Hide resolved
components/landing/topCollections/TopCollections.vue Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Feb 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codeclimate bot commented Feb 13, 2024

Code Climate has analyzed commit 6ddc7ca and detected 0 issues on this pull request.

View more on Code Climate.

@roiLeo roiLeo added the S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved label Feb 13, 2024
@hassnian
Copy link
Contributor Author

No a fan of DynamicGrid js, should be doable with only css

related? #9336 (comment)

but can be in a follow up.

sure , let's do that

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Feb 13, 2024
@yangwao
Copy link
Member

yangwao commented Feb 14, 2024

Thanks!
pay 80 usd

@yangwao yangwao merged commit cfc59c4 into kodadot:main Feb 14, 2024
14 checks passed
@yangwao
Copy link
Member

yangwao commented Feb 14, 2024

😍 Perfect, I’ve sent the payout
💵 $80 @ 7.65 USD/DOT ~ 10.458 $DOT
🧗 16faLfsywwNATaEfbH2ah75dn6ZmctQWpMS5G4KFhbmj5hnD
🔗 0x150d44dee3ded30d38ea494716441347bd8070b007d9e79ddcf03ee0d9a3d6d1

🪅 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 Feb 14, 2024
This was referenced Feb 15, 2024
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-visual-ok-✅ S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Top collections - landing page v3
7 participants