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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add item column and relative time to history #2552

Merged
merged 6 commits into from
Mar 16, 2022

Conversation

kkukelka
Copy link
Member

@kkukelka kkukelka commented Mar 15, 2022

Thank you for your contribution to the KodaDot NFT gallery.
馃憞 _ Let's make a quick check before the contribution.

history.mov

PR type

  • Bugfix
  • Feature
  • Refactoring

What's new?

  • PR closes Rework feed for collection bit聽#2547
  • Added column which shows item id and links to gallery page (name is not available so we take id for now), added relative time and tooltip with exact stamp on hover

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 </rmrk/collection/26902bc2f7c20c546a-1FVG7>
  • I've tested PR on mobile and everything seems works
  • I found edge cases
  • I've written some unit tests 馃И

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.

@netlify
Copy link

netlify bot commented Mar 15, 2022

鉁旓笍 Deploy Preview for koda-nuxt ready!

馃敤 Explore the source changes: 04376c7

馃攳 Inspect the deploy log: https://app.netlify.com/sites/koda-nuxt/deploys/623209806a85e70008ad395a

馃槑 Browse the preview: https://deploy-preview-2552--koda-nuxt.netlify.app

@yangwao yangwao requested a review from vikiival March 16, 2022 12:25
@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

Probably #2545 broke something here 馃憖

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

Probably we need to strip/cut at From and To identities as well as it's pushes other columns. Probably same as at Item filter?

image

@vikiival
Copy link
Member

Screenshot 2022-03-16 at 13 28 30

My mac has frozen.
@yangwao said that there is a pagination for the history component

@vikiival
Copy link
Member

@kkukelka may update your PR with the latest main?

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

@kkukelka may update your PR with the latest main?

Maybe you drank too much club mate?

image

@kkukelka
Copy link
Member Author

@kkukelka may update your PR with the latest main?

done

@kkukelka
Copy link
Member Author

looks normal here or am i missing something?
Screenshot 2022-03-16 at 14 36 25

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

I sense that pagination doesn't work here?
edit, yes doesn't work :)

almost frozen my stuff https://deploy-preview-2552--koda-nuxt.netlify.app/rmrk/collection/b45071647155359951-SUBSTRA?tab=history&page=5

yup this how it should look like
https://beta.kodadot.xyz/rmrk/collection/b45071647155359951-SUBSTRA?tab=history&page=8

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

clicked update branch, let's see?

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

Schumacher, seems lots of caffeine today lol

otherwise, it's working?

Screen.Recording.2022-03-16.at.14.54.07.mov

Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

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

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

@vikiival
Copy link
Member

Good eye!

{
  "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052",
  "events": [
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-MINTNFTKZ6hxTeIVTR8CKEx1UGac"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTVg-SA9ZqfMYVyNOq0TRRy"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-BUYpfpKvJxNHW2JrskhHZoDM"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTQDPhuXFgDiG2C42oehjeQ"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-BUYLSmNCpMZBeiwl2CHMj7Uu"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTRWcsa83ZhcXY3dTLX81su"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTXXxJ1lYPxRa8uf7uTg4m2"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTeBoxa_zCzB9uig5eWfKif"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTwINca_XiQf6yN1mMZJwRB"
    },
    {
      "id": "9181565-dac5c7f54029d0e73c-HXAI8-E_V_EM-0000000000000052-LISTSC43fZxm5Mg1XE4_Eyduh"
    }
  ]
}

@kkukelka fast fix is to remove everything after the last dash

const reg = /-[a-zA-Z0-9_]+$/

id.replace(reg, '')

@vikiival
Copy link
Member

Better approach is to select name and id from NFT :)

@kkukelka
Copy link
Member Author

@kkukelka fast fix is to remove everything after the last dash

const reg = /-[a-zA-Z0-9_]+$/

id.replace(reg, '')

gonna opt for regex as i dont have time update graphql query

event['Item'] = newEvent['id']?.replace(
          /-(BUY|CONSUME|LIST|MINT|MINFNFT|SEND).+$/,
          ''
        )

also made sure not to show item column on NFT Detail page

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

Add the name of the item to the history, once it would be available.
Right now making this issue name was not available.

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

pay 100 usd

@yangwao
Copy link
Member

yangwao commented Mar 16, 2022

馃槏 Perfect, I鈥檝e sent the payout
馃挼 $100 @ 127.69 USD/KSM ~ 0.783 $KSM
馃 EqdyzrzVmeHwMdMwvPeCMnNdbuQDbD3YrjY93xq9Ln3jUGW
馃敆 0x3fcf2251085ddd7b1c2e202aec1b33fd8b5b84a6c9ff8925374a1e55f9ffe8ca

馃獏 Let鈥檚 grab another issue and get rewarded!
馃獎 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Mar 16, 2022
@yangwao yangwao merged commit 24609af into kodadot:main Mar 16, 2022
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.

Rework feed for collection bit
3 participants