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

wallpaper users artist profile and collections #2329

Closed
yangwao opened this issue Feb 11, 2022 · 11 comments
Closed

wallpaper users artist profile and collections #2329

yangwao opened this issue Feb 11, 2022 · 11 comments
Labels
$ ~<50usd A-collection work being done collection view A-profile related to profile section banner p2 core functionality, or is affecting 60% of app

Comments

@yangwao
Copy link
Member

yangwao commented Feb 11, 2022

Till we implement RMRK::BANNER or our own version of banners, we would be happy for users to by default repeat on x and y with nfts on random basis from recent NFTs

  • by particular aritst
  • inside particular collection

Preferably show only static pictures, not moving stuff like gif,SVG,mp4 and 3d objects.

Put it as background with some light grey scale filter to make other components hover over it.
Probably put behind tabs as well if would not be complicated and won't harm readability

Thinking let's try with one or two rows, how it would looks like?

image

inspiration from singular
image

How to implement:

  1. From the identity call fetch field additional where you find md5 hash for profile pic and background
  2. Create new query for Subsquid nftMetaByHash where you query
query nftMetaByHash($hashes: [String!]!) {
  nftEntities(where: {hash_in: $hashes}) {
    id
    hash
    meta {
      id
      image
      animationUrl
    }
  }
}

This query should you return zero, one or two results :)

  1. properly handle the image using Cloudflare image cache
  2. ???
  3. Profit

There is an edge case where we cache identities so having another button in settings for clearing identity cache would be perfect!

Ref

@yangwao yangwao added $ ~<50usd p2 core functionality, or is affecting 60% of app A-collection work being done collection view A-profile related to profile section labels Feb 11, 2022
@roiLeo
Copy link
Contributor

roiLeo commented Feb 11, 2022

Hey! Why don't we try to fetch banner instead? @vikiival told me a while ago:

It is stored as the md5 hash of NFT in the on-chain identity (under the attribute additional)

I've already tried to make something work but I didn't know what to do with that hash.

@yangwao
Copy link
Member Author

yangwao commented Feb 11, 2022

Hey! Why don't we try to fetch banner instead? @vikiival told me a while ago:

It is stored as the md5 hash of NFT in the on-chain identity (under the attribute additional)

I've already tried to make something work but I didn't know what to do with that hash.

Okay, for artists we can do it in that way use what they set, otherwise fallback to fetch on their behalf and decorate their "home" by their craft.

For collection we can still use it tho.

@vikiival
Copy link
Member

There is one catch, I need to calculate the md5 hash of the NFT.

It will be added in the upcoming version of rubick
kodadot/rubick#32

@yangwao
Copy link
Member Author

yangwao commented Apr 5, 2022

There is one catch, I need to calculate the md5 hash of the NFT.

It will be added in the upcoming version of rubick

so we can continue on this? 🫣

@yangwao yangwao added the banner label Apr 5, 2022
@vikiival
Copy link
Member

vikiival commented Apr 6, 2022

OFC!

I'll update the description

@yangwao
Copy link
Member Author

yangwao commented Apr 7, 2022

@kkukelka
Copy link
Member

kkukelka commented Apr 7, 2022

let me take the steering wheel for a sec

@yangwao
Copy link
Member Author

yangwao commented Apr 7, 2022

@roiLeo
Copy link
Contributor

roiLeo commented Oct 3, 2022

Tested on /rmrk/u/GZDqGUs564c2pG9K6BjVnEgTnANc8Pr4FfqFr1USBDQ3r62

toJson

{
  "judgements": [],
  "deposit": 49999999500,
  "info": {
    "additional": [
      [
        {
          "raw": "0x75736572706963"
        },
        {
          "raw": "0x3531343961376539393238313635373937353365393061393836333761636631"
        }
      ],
      [
        {
          "raw": "0x6261636b67726f756e64"
        },
        {
          "raw": "0x3566613032333462323431663263363161373664343264306538633464646563"
        }
      ]
    ],
    "display": {
      "raw": "0x43727970746f4456"
    },
    "legal": {
      "none": null
    },
    "web": {
      "none": null
    },
    "riot": {
      "none": null
    },
    "email": {
      "none": null
    },
    "pgpFingerprint": null,
    "image": {
      "none": null
    },
    "twitter": {
      "raw": "0x4063727970746f6476"
    }
  }
}

toHuman

{
  "judgements": [],
  "deposit": "49,999,999,500",
  "info": {
    "additional": [
      [
        {
          "Raw": "userpic"
        },
        {
          "Raw": "5149a7e992816579753e90a98637acf1"
        }
      ],
      [
        {
          "Raw": "background"
        },
        {
          "Raw": "5fa0234b241f2c61a76d42d0e8c4ddec"
        }
      ]
    ],
    "display": {
      "Raw": "CryptoDV"
    },
    "legal": "None",
    "web": "None",
    "riot": "None",
    "email": "None",
    "pgpFingerprint": null,
    "image": "None",
    "twitter": {
      "Raw": "@cryptodv"
    }
  }
}

we have the information in the "additional" property but don't really know what to do with this stuff, can it be used?

UPDATE:

Hash: 5149a7e992816579753e90a98637acf1

query MyQuery {
  nftEntities(where: {hash_eq: "5149a7e992816579753e90a98637acf1"}) {
    id
    metadata
  }
}

result:

{
  "data": {
    "nftEntities": [
      {
        "id": "9817436-2644199cf3652aaa78-KK01-028_CLOWN-0000000000000028",
        "metadata": "ipfs://ipfs/bafkreibw7uizlzp3igwofudwu3qq4u43jguugpr5zhi2kw3d4gg2jkptta"
      }
    ]
  }
}

@vikiival
Copy link
Member

vikiival commented Oct 4, 2022

yup this is legit, I would just spin up new indexer for on-chain identities

@yangwao yangwao added p3 non-core, affecting less than 40% and removed p2 core functionality, or is affecting 60% of app labels Jan 24, 2023
@yangwao yangwao added p2 core functionality, or is affecting 60% of app and removed p3 non-core, affecting less than 40% labels May 25, 2023
@yangwao
Copy link
Member Author

yangwao commented May 25, 2023

Most likely will be closed in favour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ ~<50usd A-collection work being done collection view A-profile related to profile section banner p2 core functionality, or is affecting 60% of app
Projects
None yet
Development

No branches or pull requests

4 participants