-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct SVG rendering #12157
Direct SVG rendering #12157
Conversation
I think I will use a small script ran on |
248398b
to
9337f48
Compare
Ready for review (assuming ci passes now). |
Added gif to OP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next PR we could allow custom svg icons.
Please resolve the conflicts |
Our own custom SVG work, currently they are in |
Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: go-gitea#11618
Rebased and squashed |
This solves the issue of flashing SVG icons on page (re)load seen in some browsers (Firefox at least):
Introduce
make svg
which calls a node script that compiles svg files topublic/img/svg
which are then discovered by the backend during startup. These files are vendored to not create a dependency on Node for the backend build.On the frontend side, configure webpack using
raw-loader
so SVGs can be imported as string. Also moved our existing SVGs toweb_src/svg
for consistency.Fixes: #11618