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 long branch name overflows #30345

Merged
merged 20 commits into from Apr 16, 2024
Merged

Fix long branch name overflows #30345

merged 20 commits into from Apr 16, 2024

Conversation

silverwind
Copy link
Member

Fixes: #27971
Fixes: #28010

Screenshot 2024-04-09 at 00 19 57

Also fixes a similar issue in issue list where CSS was there but not active because of missing display: block.

Screenshot 2024-04-09 at 00 18 25

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 8, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 8, 2024
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/js labels Apr 8, 2024
@silverwind silverwind added type/bug backport/v1.22 This PR should be backported to Gitea 1.22 labels Apr 8, 2024
@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 9, 2024
@yp05327
Copy link
Contributor

yp05327 commented Apr 10, 2024

In this file:
image
should also make some changes.

image

@silverwind silverwind marked this pull request as draft April 11, 2024 18:36
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 13, 2024
@silverwind
Copy link
Member Author

silverwind commented Apr 13, 2024

Fixed that one as well:

image

@silverwind silverwind marked this pull request as ready for review April 13, 2024 15:02
@silverwind silverwind requested review from yp05327, delvh and wxiaoguang and removed request for delvh April 14, 2024 20:07
@silverwind
Copy link
Member Author

silverwind commented Apr 14, 2024

This branch ref in issue list is now also limited in width:

Screenshot 2024-04-14 at 22 18 23

* origin/main:
  Improve flex ellipsis (go-gitea#30479)
  Remove fomantic button module (go-gitea#30475)
  Improve "must-change-password" logic and document (go-gitea#30472)
  Fix commitstatus summary (go-gitea#30431)
  Remove fomantic menu module (go-gitea#30325)
  Use `flex-container` for dashboard layout (go-gitea#30214)
  Rewrite and restyle reaction selector and enable no-sizzle eslint rule (go-gitea#30453)
  Pulse page improvements (go-gitea#30149)
  Fix JS error when opening to expanded code comment (go-gitea#30463)
  fix: Fix to delete cookie when AppSubURL is non-empty (go-gitea#30375)
  Add `interface{}` to `any` replacement to `make fmt`, exclude `*.pb.go` (go-gitea#30461)
  Fix network error when open/close organization/individual projects and redirect to project page (go-gitea#30387)
  Avoid losing token when updating mirror settings (go-gitea#30429)
@silverwind
Copy link
Member Author

silverwind commented Apr 15, 2024

Found a new one, maybe we can do this in another PR 🤔

That's kind of a different problem. It needs ..., but it also needs a title there to allow distinguishment. Likely all such dropdowns need title an their items, ideally only on items that actually overflowed, so it would likely need a JS solution.

@silverwind
Copy link
Member Author

Another fix pushed for this:

Screenshot 2024-04-15 at 21 12 49

@silverwind
Copy link
Member Author

Another issue I found is that overflow:hidden on buttons did not work correctly because the CSS had line-height: 1. I've reset to normal and adjusted the vertical padding of buttons to give the same height as before.

image

@silverwind silverwind changed the title Fix long branch name overflow in branch selector and issue list Fix long branch name overflows Apr 15, 2024
@silverwind
Copy link
Member Author

So I reverted all these "dropdown button" styles and just use gt-ellipsis on that button now. Global button changes will come later (and eliminate line-height: 1).

image

Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

Using "button" inside "dropdown" seems an abuse. It could not be in this PR's scope and be refactored later.

@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 16, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 16, 2024
@silverwind silverwind enabled auto-merge (squash) April 16, 2024 08:26
@silverwind
Copy link
Member Author

Using "button" inside "dropdown" seems an abuse. It could not be in this PR's scope and be refactored later.

Indeed, likely it should be https://fomantic-ui.com/modules/dropdown.html#selection.

@silverwind silverwind merged commit a658e2f into go-gitea:main Apr 16, 2024
26 checks passed
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.22. @silverwind, please send one manually. 🍵

go run ./contrib/backport 30345
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added backport/manual No power to the bots! Create your backport yourself! and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Apr 16, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 17, 2024
* giteaofficial/main:
  Reduce unnecessary database queries on actions table (go-gitea#30509)
  [skip ci] Updated translations via Crowdin
  Tweak and fix toggle checkboxes (go-gitea#30527)
  Tweak repo buttons on mobile and labeled button border-radius (go-gitea#30503)
  Fix long branch name overflows (go-gitea#30345)
  Update API to return 'source_id' for users (go-gitea#29718)
  Allow `preferred_username` as username source for OIDC (go-gitea#30454)
  Fix empty field `login_name` in API response JSON when creating user (go-gitea#30511)
  feat(api): implement branch/commit comparison API (go-gitea#30349)
@wxiaoguang wxiaoguang mentioned this pull request Apr 23, 2024
11 tasks
@silverwind silverwind deleted the longbranch branch April 23, 2024 18:05
@wxiaoguang wxiaoguang modified the milestones: 1.23.0, 1.22.0 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/manual No power to the bots! Create your backport yourself! backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/js modifies/templates This PR modifies the template files size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long name branch/tag display problem in repo home page
5 participants