Git Product home page Git Product logo

Comments (8)

davidtheclark avatar davidtheclark commented on May 27, 2024 2

@tristen: I have never created or exported SVGs myself, so I'd love help figuring out and documenting this stuff.

from batfish.

tristen avatar tristen commented on May 27, 2024

Just documentation on what the SVG should look like (i.e exported with inline styles and as few paths as possible?). I've used it on SVGs exported from Inkscape and it didn't go well.

from batfish.

samanpwbb avatar samanpwbb commented on May 27, 2024

The only two rules that I think need to be enforced are:

Also important to note that height / width properties will be ignored by batfish. Maybe we should output a warning message in cases where this happens?

from batfish.

davidtheclark avatar davidtheclark commented on May 27, 2024

I'm thinking that this tool for converting SVGs to optimized React components should be an independent open-source project. We should see if a suitable one already exists (I assume I did this before and didn't find any?), and if not let's create and publish it. Seems to me pretty useful for React devs.

from batfish.

samanpwbb avatar samanpwbb commented on May 27, 2024

This seems similar: https://github.com/boopathi/react-svg-loader, but our system has some weird quirks wrt logo recoloring.

from batfish.

davidtheclark avatar davidtheclark commented on May 27, 2024

react-svg-loader looks great! I don't remember why I didn't use it before, and instead wrote some code "inspired" by it 🙄. We should try it again.

from batfish.

davidtheclark avatar davidtheclark commented on May 27, 2024

Ugh, I've looked through a confusing batch of open-source SVG-to-JSX things. All of them seem partially if not wholly abandoned? Very hard to judge. I've sent out a feeler to see how active react-svg-loader is. If it seems to be stalled, seems we'll want to write out own thing.

from batfish.

davidtheclark avatar davidtheclark commented on May 27, 2024

I made:

I'm actually thinking maybe none of them should be included in Batfish proper — but should be suggested as recommendations, and included in the mapbox-batfish wrapper with more defaults.

from batfish.

Related Issues (20)

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.