Skip to content

Migrate fomantic search and modal CSS to first-party modules#36869

Merged
delvh merged 6 commits intogo-gitea:mainfrom
silverwind:rmsearchcss
Mar 17, 2026
Merged

Migrate fomantic search and modal CSS to first-party modules#36869
delvh merged 6 commits intogo-gitea:mainfrom
silverwind:rmsearchcss

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 8, 2026

Replace the fomantic search.css (520 lines) and modal.css (698 lines) with minimal first-party modules containing only the rules actually used. Hardcoded colors are replaced with theme variables, and the base.css overrides are merged directly into the new modules.

With this change, all original Fomantic CSS is now gone.

search.css: 520 → 85 lines
modal.css: 698 → 329 lines

Replace the fomantic search.css (520 lines) with a minimal first-party
module (80 lines) containing only the rules actually used. Hardcoded
colors are replaced with theme variables, and the base.css overrides
are merged directly into the new module.

Eliminated unused CSS for: category search, selection search, loading
spinner, disabled state, scrolling/long/short variations, left/right
alignment, all size variants, price display, message display, and
action buttons.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 8, 2026
@silverwind silverwind added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Mar 8, 2026
Replace the fomantic modal.css (698 lines) with a minimal first-party
module (329 lines) containing only the rules actually used. Hardcoded
colors are replaced with theme variables, and the base.css overrides
are merged directly into the new module.

Eliminated unused CSS for: basic modal, legacy modal positioning,
inverted dimmer coupling, aligned variations, undetached scrolling,
overlay fullscreen, image content/description layout, all large size
variants (large/big/huge/massive), loading state, scrolling content,
and vendor-prefixed user-select.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind changed the title Migrate fomantic search CSS to first-party module Migrate fomantic search and modal CSS to first-party modules Mar 8, 2026
@silverwind silverwind changed the title Migrate fomantic search and modal CSS to first-party modules Migrate fomantic search and modal CSS to first-party modules Mar 8, 2026
No fomantic CSS components remain, so remove the empty file and
its webpack entry point.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@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 Mar 9, 2026
@silverwind silverwind requested a review from Copilot March 10, 2026 09:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the remaining Fomantic-provided search and modal CSS from the frontend bundle and replaces it with first-party CSS modules containing only the rules needed by the app, using theme variables for colors and consolidating prior base overrides.

Changes:

  • Remove web_src/fomantic/build/fomantic.css from the webpack entry and stop building Fomantic modal/search CSS components.
  • Add a new first-party web_src/css/modules/search.css module and import it from web_src/css/index.css.
  • Expand web_src/css/modules/modal.css to include the required (previously Fomantic-provided) modal styling, and remove related overrides from web_src/css/base.css.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
webpack.config.ts Drops fomantic.css from the main CSS bundle entry.
web_src/fomantic/semantic.json Removes Fomantic modal/search components from the build config.
web_src/fomantic/build/fomantic.css Removes imports for the deleted Fomantic CSS components (file becomes empty).
web_src/fomantic/build/components/search.css Deletes upstream Fomantic search CSS.
web_src/fomantic/build/components/modal.css Deletes upstream Fomantic modal CSS.
web_src/css/modules/search.css New minimal first-party search styling.
web_src/css/modules/modal.css Incorporates required modal styling into the first-party module.
web_src/css/index.css Imports the new search module.
web_src/css/base.css Removes search-related overrides and updates modal z-index comment.

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

You can also share your feedback on Copilot code review. Take the survey.

silverwind and others added 2 commits March 13, 2026 15:17
Restore transform-origin: center top on .ui.search > .results to
preserve the fomantic transition module scale animation origin.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@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 Mar 16, 2026
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 17, 2026
@delvh delvh merged commit 89cd373 into go-gitea:main Mar 17, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Mar 17, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 17, 2026
@silverwind silverwind deleted the rmsearchcss branch March 17, 2026 07:45
silverwind added a commit to silverwind/gitea that referenced this pull request Mar 17, 2026
* origin/main:
  Update Nix flake (go-gitea#36902)
  Migrate fomantic `search` and `modal` CSS to first-party modules (go-gitea#36869)
  Feature: Add per-runner “Disable/Pause” (go-gitea#36776)

# Conflicts:
#	webpack.config.ts
silverwind added a commit to silverwind/gitea that referenced this pull request Mar 17, 2026
The fomantic CSS was migrated to first-party modules in go-gitea#36869,
but the import in index-domready.ts was left behind after merge.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 18, 2026
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Update Nix flake (go-gitea#36902)
  Migrate fomantic `search` and `modal` CSS to first-party modules (go-gitea#36869)
  Feature: Add per-runner “Disable/Pause” (go-gitea#36776)
  Enable native dark mode for swagger-ui (go-gitea#36899)
  Front port changelog for 1.25.5 (go-gitea#36892)
  Fix typos in code comments: doesnt, dont, wont (go-gitea#36890)
  Vendor relative-time-element as local web component (go-gitea#36853)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants