Code Monkey home page Code Monkey logo

nft-components's Issues

Video renderer enhancements

  • Progress Bar: allow scrubbing, jumping in time. For longer videos especially a narrative or music video (for example) this would be a nice addition.
  • Loading state: Make same aspect ratio (size) as media object.

Understand many nft's are video loops so not meant to be scrubbed, so perhaps progress bar becomes visible while hovering at bottom of video container.

FullComponents AuctionInfo to show market info once auction is over.

Currently when using the FullComponents.AuctionInfo component shows sold for info inconsistently:
I believe this is located to NFT Components and not the Iframe Embed codebase.

Perhaps we should revisit this component, and add some config options for what it renders for different market states.

Not showing here:
https://embed.zora.co/config/0x364547ADfc7a180744D762056Df35eeaEa803EC4/1

Although showing here:
https://embed.zora.co/config/foundation/105683

Screen Shot 2021-11-30 at 5 15 08 PM

Screen Shot 2021-11-30 at 5 11 13 PM

Screen Shot 2021-11-30 at 5 11 58 PM

Supporting Safari on iOS

We're not having luck with the NFTPreview component working in Safari on iOS for rabbithole.gg. It is working on desktop.

<MediaConfiguration
  networkId={networkId}
  style={styleOverride(true)}
>
  <NFTPreview
    id={id}
    showBids={false}
    refreshInterval={5000}
    href={`https://zora.co/${data?.nft?.creator}/${data?.nft?.tokenId}`}
  />
</MediaConfiguration>

pulse-image-1638393222838

NFT-Components Doesn't Work with React 18 because package is shipping React 17 to users

After importing @zora/nft-components package in https://github.com/benschac/create-zora-graphql-app/ I got an error.

Unhandled Runtime Error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

Which 3 seemed like the likely culprit.

I then: npm ls react and confirmed @zora/nft-components was the only package that shipped with react v.17

[email protected] /Users/benjaminschachter/zora-hack
├─┬ @apollo/[email protected]
│ └── [email protected] deduped
├─┬ @rainbow-me/[email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ └─┬ [email protected]
│ │   └── [email protected] deduped
│ └── [email protected] deduped
├─┬ @zoralabs/[email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├── [email protected]
│ └─┬ [email protected]
│   └── [email protected] deduped
├─┬ @zoralabs/[email protected]
│ ├── [email protected] deduped
│ └─┬ [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├── [email protected] deduped
│ └─┬ [email protected]
│   └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
  ├─┬ @wagmi/[email protected]
  │ └─┬ [email protected]
  │   └── [email protected] deduped
  ├─┬ [email protected]
  │ └── [email protected] deduped
  ├── [email protected] deduped
  └─┬ [email protected]
    └── [email protected] deduped
    ```
    
    
 To test that `@zora/nft-components` was the culprit I added [selective version resolutions](https://classic.yarnpkg.com/en/docs/selective-version-resolutions/) and bumped `@zora/nft-components` to v18 with the rest of my project.
 
 https://github.com/benschac/create-zora-graphql-app/blob/main/package.json#L25
 
 Now the components work and the page is loading.
 
 The simplest solution here seems to not ship a version of react with `@zora/nft-components`

Utilize new media properties from NFTObject in RenderRequest

New. media properties in NFTObject allow us to use mediaEncodings from Zora API

media?: {
    mimeType?: string;
    source: MEDIA_SOURCES;
    image?: MediaObject;
    large?: MediaObject;
    poster?: MediaObject;
    thumbnail?: MediaObject;
    // backwards compatibility
    content?: MediaObject;
  };

We should be surfacing these new properties in RenderRequest so they can be used in renderers. Current RenderRequest only surfaces these properties:

 media: {
    // from zora content uri
    content?: MediaUriType;
    image?: MediaUriType;
    // from metadata.animation_url
    animation?: MediaUriType;
  };

NFTPreview / video

Hello zora,

  1. great job. thanks for all the tooling you open source and the visual design is just bonkers.
  2. I can't access the discord anymore cause my phone number is taken, which worries me a little bit. currently I would really need the dev discord

My main problem is:
This is the collection I want to show on our website

The fetching with the zora zdk works properly but the NFTPreview shows me "unknown".
Here is a link to the codesandbox. With the parameters you give in the storybook the video preview works but it simply doesn't work for the NFTs I want to show. Any idea what might cause the issue.

EDIT (18. Jul 2022): I get a preview now of the NFT – see codesandbox.

  1. Is it possible to integrate buy now on the page and not to link to zora marketplace? I know there "place-bid" hooks which allow this functionality.
  2. The preview is still image only not the video if there is a video: NFTPreview and FullPage have the same issue – only show picture preview.

Happy Monday from Vienna

a11y audit

Audit components (especially media players) for a11y support.

Update to React 18

Many projects like Vite are on 18, and that makes it not compatible with this library. Could you please update to React 18.

Skeleton Loaders

Some skeleton loader ui for media and some of the other components that currently show ...

Docs: typo in Custom Media Components

🔬 In src/stories/CustomMediaObjects.stories.mdx, I found a typographical error at the end of this sentence:

These components can be upgraded or overrideen.

I will open a PR to address this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.