Code Monkey home page Code Monkey logo

Comments (4)

tiffanynolan avatar tiffanynolan commented on August 17, 2024

https://user-images.githubusercontent.com/981838/135095293-902e820c-45ad-43c5-8dca-a00fd849263b.png

from patternfly-quickstarts.

jschuler avatar jschuler commented on August 17, 2024

Hi @tiffanynolan

  1. you can pass an icon directly in the yaml file using the base64 approach, this would not require any further setup/dependencies on the consumer side. If you want to pass other formats, it is possible.
    For example, you can define the quick start content in javascript, and pass the icon as a ReactNode, like here:
    https://stackblitz.com/edit/react-ts-wcc244?file=quick-starts%2Fquickstart-three.tsx
    There are multiple options, you could even have a lookup map in the code that would insert the right icon at runtime

  2. Curious how CDN loaded images would improve page load?

from patternfly-quickstarts.

wtrocki avatar wtrocki commented on August 17, 2024

Repeated images of the same dataurl will reoccur in bundle.
Problem can be solved by:

  • cdn /url
  • bundler/code splitting
  • ignored (accept up to 100kb penality in pessimistic scenario)

We use yaml format

from patternfly-quickstarts.

jschuler avatar jschuler commented on August 17, 2024

I think these are all either handled already or need to be done on consumer side:

  • you can pass href to icon in yaml so that already works (example: icon: https://discuss-assets.s3.amazonaws.com/original/3X/1/9/19823cc1f1f887d70755e0b500dd8ce2c51ba7f9.svg
  • can setup for example webpack to map quickstarts to icons, and inject those icons at runtime

I'll close this for now, but feel free to let me know if I am still missing something

thanks!

from patternfly-quickstarts.

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.