Skip to content

fix(build): swagger css import#37801

Merged
bircni merged 4 commits into
go-gitea:mainfrom
lunny:lunny/fix_css_import
May 21, 2026
Merged

fix(build): swagger css import#37801
bircni merged 4 commits into
go-gitea:mainfrom
lunny:lunny/fix_css_import

Conversation

@lunny

@lunny lunny commented May 21, 2026

Copy link
Copy Markdown
Member

Snap build failure caused by missed swagger ui css file.

:: [plugin vite:css] /build/gitea/parts/gitea/build/web_src/css/swagger-standalone.css:undefined:NaN
:: Error: [postcss] ENOENT: no such file or directory, open '../../node_modules/swagger-ui-dist/swagger-ui.css'

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 21, 2026
@lunny lunny requested review from Copilot and silverwind May 21, 2026 04:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Swagger UI CSS import so Vite/PostCSS can resolve it reliably in environments where a relative ../../node_modules/... path is not valid (e.g., Snap builds).

Changes:

  • Switch Swagger UI CSS import from a relative node_modules path to a package-resolved import (swagger-ui-dist/swagger-ui.css).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@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 May 21, 2026
@silverwind

Copy link
Copy Markdown
Member

Good find, this seems to be some slop I generated.

@lunny lunny marked this pull request as ready for review May 21, 2026 05:06
@lunny lunny added the type/bug label May 21, 2026
@lunny lunny changed the title fix swagger css import fix(build): swagger css import May 21, 2026
@lunny lunny added the backport/v1.26 This PR should be backported to Gitea 1.26 label May 21, 2026
@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 May 21, 2026
@bircni bircni enabled auto-merge (squash) May 21, 2026 13:53
@bircni bircni added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 21, 2026
@bircni bircni merged commit 8874ba7 into go-gitea:main May 21, 2026
23 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 21, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 21, 2026
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label May 21, 2026
@lunny lunny deleted the lunny/fix_css_import branch May 21, 2026 14:42
bircni pushed a commit that referenced this pull request May 21, 2026
Backport #37801 by @lunny

Snap build failure caused by missed swagger ui css file.

```
:: [plugin vite:css] /build/gitea/parts/gitea/build/web_src/css/swagger-standalone.css:undefined:NaN
:: Error: [postcss] ENOENT: no such file or directory, open '../../node_modules/swagger-ui-dist/swagger-ui.css'
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
@bircni

bircni commented May 21, 2026

Copy link
Copy Markdown
Member

Good find, this seems to be some slop I generated.

can we cover this somehow in ci?

zjjhot added a commit to zjjhot/gitea that referenced this pull request May 22, 2026
* main: (70 commits)
  fix(api): handle partial failures in push mirror synchronization gracefully (go-gitea#37782)
  fix(deps): update module golang.org/x/crypto to v0.52.0 [security] (go-gitea#37806)
  fix(build): swagger css import (go-gitea#37801)
  feat: add copy button to action step header, improve other copy buttons (go-gitea#37744)
  style: misc UI fixes (go-gitea#37691)
  ci: shard tests and reduce redundant work (go-gitea#37618)
  chore: simplify issue and pull request templates (go-gitea#37799)
  chore: Update 1.26.2 changelog in main (go-gitea#37796)
  fix(actions): make artifact signature payloads unambiguous (go-gitea#37707)
  chore: Update giteabot to fix failure when backport (go-gitea#37789)
  fix(deps): update module github.com/go-git/go-git/v5 to v5.19.1 [security] (go-gitea#37786)
  fix(pull): handle empty pull request files view to allow reviews (go-gitea#37783)
  fix(markup): make RenderString never fail (go-gitea#37779)
  fix(markup): wrap indented code blocks for the code-copy button (go-gitea#37748)
  fix(permissions): Fix reading permission (go-gitea#37769)
  fix: add natural sort to sortTreeViewNodes (go-gitea#37772)
  fix: package creation unique conflict (go-gitea#37774)
  fix(deps): update npm dependencies (go-gitea#37768)
  fix(deps): update module gitlab.com/gitlab-org/api/client-go/v2 to v2.26.0 (go-gitea#37771)
  ci: split giteabot workflow (go-gitea#37770)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/v1.26 This PR should be backported to Gitea 1.26 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.

5 participants