Move Fomantic dropdown CSS to custom module#36530
Conversation
Moved fomantic dropdown css to custom module, tested on the dropdown devtest page, it renders exactly the same as before while using roughly half the CSS. The clean up was very conservative, likely more can be done in the future. Also, this fixes a bug present on main branch where dropdown border has incorrect color on hover. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* origin/main: (34 commits) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) Fix mirror sync parser and fix mirror messages (go-gitea#36504) Update JS and PY deps (go-gitea#36576) Add viewer controller for mermaid (zoom, drag) (go-gitea#36557) Misc typescript tweaks (go-gitea#36523) Use full-file highlighting for diff sections (go-gitea#36561) fix(diff): reprocess htmx content after loading more files (go-gitea#36568) [skip ci] Updated translations via Crowdin Add wrap to runner label list (go-gitea#36565) fix: add dnf5 command for Fedora in RPM package instructions (go-gitea#36527) Enable pagination on GiteaDownloader.getIssueReactions() (go-gitea#36549) Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) ...
Restore CSS rules from the original fomantic dropdown module that were not carried over during the migration to a custom module. This fixes image alignment in dropdown items (e.g. assignee filter avatars) and restores rules for allowAdditions, empty selection state, and the multi-select sizer span. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Fixed image-related regressions and checked various dropdowns on the page, couldn't see any more regressions. |
…rule Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates Fomantic dropdown CSS from the Fomantic build system to a custom CSS module, reducing CSS size by approximately 50% through conservative cleanup. The migration involves removing the dropdown component from Fomantic's semantic.json configuration and creating a new custom dropdown.css module that replaces the Fomantic styles with Gitea's custom variables and conventions.
Changes:
- Removed Fomantic dropdown component from build configuration and created custom dropdown.css module
- Consolidated dropdown-related CSS rules from base.css and divider.css into the new module
- Disabled stylelint rule preventing
emunits forline-heightto accommodate migrated Fomantic code
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web_src/fomantic/semantic.json | Removed "dropdown" from Fomantic components list |
| web_src/fomantic/build/fomantic.css | Removed import of Fomantic dropdown.css |
| web_src/fomantic/build/components/dropdown.css | Deleted entire Fomantic dropdown CSS file (1755 lines) |
| web_src/css/modules/dropdown.css | Added new custom dropdown module (1041 lines) with Gitea-specific variables and styles |
| web_src/css/modules/divider.css | Removed dropdown divider styles (moved to dropdown.css) |
| web_src/css/index.css | Added import for new dropdown.css module |
| web_src/css/base.css | Removed dropdown-related CSS rules (moved to dropdown.css) |
| stylelint.config.js | Disabled declaration-property-unit-disallowed-list rule to allow em units for line-height |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: silverwind <me@silverwind.io>
Suggested by lunny https://discord.com/channels/322538954119184384/323701541297192961/1472491165004726345
And we might could enable the feature that dissmissing all the previous reviews once a new commit pushed after it was approved or rejected.
This PR gets new changes after approval.
|
This comment was written by Claude. I performed a visual verification of dropdown rendering on the Dropdowns verifiedDevtest page (
Header navigation:
Repository pages:
Issue creation:
Settings pages:
Footer:
ResultNo visual regressions detected. All dropdowns render correctly in both themes — backgrounds, borders, shadows, hover/active states, icon alignment, text colors, and spacing all match expected behavior. |
ChristopherHX
left a comment
There was a problem hiding this comment.
I will checkout this branch soon, to look into devtools
|
Looks like a merge has re-introduced some previously deleted CSS on this branch, I will fix. |
* origin/main: feat: add branch_count to repository API (go-gitea#35351) (go-gitea#36743)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use octicon-triangle-down SVG instead of the Dropdown icon font for selection dropdowns, and remove the now-unused @font-face and related CSS rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove CSS for features not used in the codebase: right/left floated items, icon button dropdown, compact selection, .flag selector, loading dropdown button, large dropdown font-size, top-left pointing dropdown, pointing upward dropdown, and large button dropdown padding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Ready again, removed a bunch more unused css. |
|
The diff looks much cleaner now, next trying to compare the dropdowns visually myself between this PR and main. |
|
fyi some of these can be tested on http://localhost:3000/devtest/fomantic-dropdown. They should be nearly indistinguishable from main branch, even all the misalignments are preserved. |
Yes I confirm the devtest page looks and behave the same. |
|
Then please approve and lets merge. |
|
Was still looking outside of the test page, looks good. |
|
Thanks! |
* origin/main: Move Fomantic dropdown CSS to custom module (go-gitea#36530) Use "Enable Gravatar" but not "Disable" (go-gitea#36771) feat: add branch_count to repository API (go-gitea#35351) (go-gitea#36743) Deprecate RenderWithErr (go-gitea#36769) Lazy-load some Vue components, fix heatmap chunk loading on every page (go-gitea#36719) Filter out untracked files from spellchecking (go-gitea#36756) Fix CSS stacking context issue in actions log (go-gitea#36749) Fix milestone/project text overflow in issue sidebar (go-gitea#36741) Update tool dependencies and fix new lint issues (go-gitea#36702) Instance-wide (global) info banner and maintenance mode (go-gitea#36571) Add created_by filter to SearchIssues (go-gitea#36670) Inline and lazy-load EasyMDE CSS, fix border colors (go-gitea#36714) # Conflicts: # templates/repo/issue/view_content/pull_merge_box.tmpl # web_src/js/features/repo-issue-pull.ts
* giteaofficial/main: (21 commits) Enable docker layer caching for `dry-run` and `nightly` container builds (go-gitea#36738) Add admin badge to navbar avatar (go-gitea#36790) WorkflowDispatch api optionally return runid (go-gitea#36706) upgrade minimatch (go-gitea#36760) Add `never` option to `PUBLIC_URL_DETECTION` configuration (go-gitea#36785) Refactor avatar package, support default avatar fallback (go-gitea#36788) Mark unused&immature activitypub as "not implemented" (go-gitea#36789) Add “Copy Source” to markup comment menu (go-gitea#36726) Update Nix flake (go-gitea#36787) Implements OIDC RP-Initiated Logout (go-gitea#36724) Fix README symlink resolution in subdirectories like .github (go-gitea#36775) [skip ci] Updated translations via Crowdin Correct spelling (go-gitea#36783) refactor: replace legacy tw-flex utility classes with flex-text-block/inline (go-gitea#36778) Fix `no-content` message not rendering after comment edit (go-gitea#36733) Fix typos and grammar in English locale (go-gitea#36751) Move Fomantic dropdown CSS to custom module (go-gitea#36530) Use "Enable Gravatar" but not "Disable" (go-gitea#36771) feat: add branch_count to repository API (go-gitea#35351) (go-gitea#36743) Deprecate RenderWithErr (go-gitea#36769) ...

Moved fomantic dropdown css to custom module, tested on the dropdown devtest page, it renders exactly the same as before while using roughly 50% less CSS. The clean up was very conservative, likely more can be done in the future.
Also, this fixes a bug present on main branch where dropdown border has incorrect color on hover.