Skip to content
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

Fix missing icons and colorpicker when mounted on suburl #15501

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

zeripath
Copy link
Contributor

icons and colorpicker are missing when mounted on a suburl. This PR fixes this.

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.0 milestone Apr 15, 2021
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 15, 2021
webpack.config.js Outdated Show resolved Hide resolved
@go-gitea go-gitea deleted a comment from zeripath Apr 15, 2021
webpack.config.js Outdated Show resolved Hide resolved
@zeripath
Copy link
Contributor Author

The global flag is necessary

From try.gitea.io/index.css unminified:

@font-face {
    font-family: Icons;
    src: url(themes/default/assets/fonts/icons.eot);
    src: url(themes/default/assets/fonts/icons.eot?#iefix) format("embedded-opentype"),url(/fonts/icons.woff2) format("woff2"),url(themes/default/assets/fonts/icons.woff) format("woff"),url(themes/default/assets/fonts/icons.ttf) format("truetype"),url(themes/default/assets/fonts/icons.svg#icons) format("svg");
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-decoration:inherit;text-transform:none}

I think we even need to do the eot ones too

@silverwind
Copy link
Member

I think we even need to do the eot ones too

Modern browsers (e.g. those we support) should not hit on EOT/SVG fonts but prefer WOFF.

The global flag is necessary

Why? global flag is pointless for simple regex.test which I think is what webpack would perform. It does not matter if there is more than 1 match.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor Author

you're right. Strangely I was sure that the g did the thing I wanted it to do.

Sorry.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 15, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 15, 2021
@lafriks lafriks merged commit 6a7090b into go-gitea:master Apr 15, 2021
@lafriks
Copy link
Member

lafriks commented Apr 15, 2021

please send backport

@zeripath zeripath deleted the icons-missing-on-suburl branch April 16, 2021 17:30
@zeripath
Copy link
Contributor Author

I don't think this actually does need a backport

@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants