Skip to content

Refactor frontend tw-justify-between layouts to flex-left-right#37291

Merged
wxiaoguang merged 5 commits intomainfrom
copilot/refactor-tw-justify-between-class
Apr 19, 2026
Merged

Refactor frontend tw-justify-between layouts to flex-left-right#37291
wxiaoguang merged 5 commits intomainfrom
copilot/refactor-tw-justify-between-class

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 19, 2026

This PR standardizes left/right two-child frontend layouts on flex-left-right and removes ad-hoc tw-justify-between combinations. The goal is consistent wrapping + spacing behavior under narrow widths with less utility-class churn.

Also: remove useless "flex-center-wrap", slightly improve some templates (no visual change, tested)


Authorship attribution: Copilot (GPT-5.4)

Co-Authored-By: Copilot GPT-5.4 <copilot-gpt-5-4@users.noreply.github.com>

Agent-Logs-Url: https://github.com/go-gitea/gitea/sessions/60f35335-afaf-4bcf-a4cf-db8e42203c61

Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 19, 2026
@wxiaoguang wxiaoguang marked this pull request as ready for review April 19, 2026 09:42
@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 19, 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 Apr 19, 2026
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 19, 2026

This may be fine, but generally I'm against adding/using any more such "helper classes" because they are hard to discover and reason about. Tailwind's classes are more verbose, but don't make me have to go look up in CSS what a class actually does. I prefer simple 1:1 classes.

@wxiaoguang
Copy link
Copy Markdown
Contributor

This may be fine, but generally I'm against adding/using any more such "helper classes" because they are hard to discover and reason about. Tailwind's classes are more verbose, but don't make me have to go look up in CSS what a class actually does. I prefer simple 1:1 classes.

You mean you will keep writing <div class="flex items-center justify-between flex-wrap gap-2"> in the future? Even hundreds of times?

@wxiaoguang wxiaoguang merged commit 30be22f into main Apr 19, 2026
30 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 19, 2026
@wxiaoguang wxiaoguang deleted the copilot/refactor-tw-justify-between-class branch April 19, 2026 10:57
@silverwind
Copy link
Copy Markdown
Member

Yes, I can fully understand what this does by just looking at the HTML only and this is the main reason tailwindcss is so popular. It avoids having to context-switch into CSS.

It's never clear-cut when a CSS class is better over tailwind, but I think ~5 classes on a element is not a problem.

@wxiaoguang
Copy link
Copy Markdown
Contributor

There are also enough people against for the excessively used tailwind helper classes.

I believe there should be a balance, use it, but don't abuse it. Just like AI

silverwind added a commit to silverwind/gitea that referenced this pull request Apr 19, 2026
* 'cast' of github.com:silverwind/gitea:
  Fix Mermaid diagrams failing when node labels contain line breaks (go-gitea#37296)
  Add project column picker to issue and pull request sidebar (go-gitea#37037)
  Fix container auth for public instance (go-gitea#37290)
  Refactor frontend `tw-justify-between` layouts to `flex-left-right` (go-gitea#37291)
  Update Nix flake (go-gitea#37284)
  Workflow Artifact Info Hover (go-gitea#37100)
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 20, 2026
* main: (25 commits)
  Add WebKit to e2e test matrix (go-gitea#37298)
  Don't add useless labels which will bother changelog generation (go-gitea#37267)
  Fix Repository transferring page (go-gitea#37277)
  Stabilize issue-project e2e test, increase timeout factor (go-gitea#37297)
  Fix Mermaid diagrams failing when node labels contain line breaks (go-gitea#37296)
  Add project column picker to issue and pull request sidebar (go-gitea#37037)
  Fix container auth for public instance (go-gitea#37290)
  Refactor frontend `tw-justify-between` layouts to `flex-left-right` (go-gitea#37291)
  Update Nix flake (go-gitea#37284)
  Workflow Artifact Info Hover (go-gitea#37100)
  [skip ci] Updated translations via Crowdin
  release notes for 1.26.0 (go-gitea#37282)
  Enhance GetActionWorkflow to support fallback references (go-gitea#37189)
  Refactor LDAP tests (go-gitea#37274)
  Remove `SubmitEvent` polyfill (go-gitea#37276)
  Upgrade go-git to v5.18.0 (go-gitea#37268)
  Avoid top-level await (go-gitea#37272)
  Frontend iframe renderer framework: 3D models, OpenAPI (go-gitea#37233)
  pull: Fix CODEOWNERS absolute path matching. (go-gitea#37244)
  Swift registry metadata: preserve more JSON fields and accept empty metadata (go-gitea#37254)
  ...
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants