Giter VIP home page Giter VIP logo

sanity-plugin-inline-svg-upload-preview's People

Contributors

artemartemov avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sanity-plugin-inline-svg-upload-preview's Issues

Potential Bug with SVG Upload Action

Howdy,

I've run into a potential bug with the SVG Uploader after the last couple of Sanity Studio updates where the Upload SVG button is no longer clickable. Previously uploaded SVGs can still be removed, but once gone you can't upload a new one.

I have not been able to track down the source of the issue (which may be beyond my capabilities) but I was able to create a hack with CSS to show the default browser Choose File button and make use of this plugin with that method.

Question

Is anyone else experiencing this issue with the latest Sanity updates? @artemartemov

Console Error Messages

image

My CSS Hack

OWYN_โ€“_Sanity

Sanity Studio Versions

image

Error: Unable to use Multiple Instances of svgUploadPreview in single document

I'm attempting to use this type multiple times in a single document.

eg:

    ...,
    {
      name: "svgTop",
      title: "Top Image",
      type: "svgUploadPreview",
      description: "Used on the index page - displayed at the top",
      validation: (Rule) => Rule.required(),
    },
    {
      name: "svgBottom",
      title: "Bottom Image",
      type: "svgUploadPreview",
      description: "Used on the index page - displayed at the bottom",
      validation: (Rule) => Rule.required(),
    },
    {
      name: "svgCombined",
      title: "Combined Image",
      type: "svgUploadPreview",
      description: "Used as the header on non-index pages and within the menu.",
      validation: (Rule) => Rule.required(),
    },
    ...

It seems this causes an issue as all inputs have the same HTML name / id attribute svg-upload.

I'd be happy to open a PR but it seems like the easy fix might be replace svg-upload here with this.props.name and the htmlFor attribute on line 54.

Thanks for your work on this.

Sanity Studio V3 support

Hey! Thanks for this plugin but now it's not compatible with the latest Sanity Studio.
We are interested in having this plugin in our project so we'd be happy to step in and develop the next version

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.