All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
33.2k stars 3.8k forks source link

Move assets to dedicated folders #4541

Open amanape opened 2 hours ago

amanape commented 2 hours ago

seems strange to me to put components into the assets dir, no? maybe components/icons/?

_Originally posted by @rbren in https://github.com/All-Hands-AI/OpenHands/pull/4535#discussion_r1815074574_

Additionally, we could move the SVGs in /assets to somewhere like /public

rbren commented 2 hours ago

Yeah if they're straight SVGs, putting that into /public makes sense. But if they're templated using React, they should probably be in components

amanape commented 2 hours ago

We have a mix of both. Some are pure .svg's while others are components "wrapping" SVGs. We may open a separate issue for this but the main reason is that we can modify certain props like the fill if it is a component and not when it is an .svg (seems to be a Vite thing I think)

rbren commented 2 hours ago

I think CSS can do this? Not 100% sure

amanape commented 1 hour ago

It's something to do with the SVG plugin we use to directly import and use them in React.

It looks though there is a small effort workaround available https://stackoverflow.com/a/75232649. That way we can migrate all SVG components to pure SVGs and move them all to /public