Skip to content

Fix milestone/project text overflow in issue sidebar#36741

Merged
silverwind merged 4 commits intogo-gitea:mainfrom
WinterCabbage:fix/issue-sidebar-overflow
Feb 26, 2026
Merged

Fix milestone/project text overflow in issue sidebar#36741
silverwind merged 4 commits intogo-gitea:mainfrom
WinterCabbage:fix/issue-sidebar-overflow

Conversation

@WinterCabbage
Copy link
Copy Markdown
Contributor


When milestone or project names contain long unbroken strings, they overflow the sidebar in the issue/PR view. This adds text truncation with ellipsis to both the dropdown menu items and the sidebar display, using the same flex-items-menu + gt-ellipsis pattern already used by other sidebar components (e.g. reviewer list).

Changes:

  • Add flex-items-menu class to the scrolling menu <div> to enable flex layout on items
  • Wrap name/title text in <span class="gt-ellipsis tw-flex-1"> for truncation
  • Add tw-shrink-0 to SVG icons to prevent them from shrinking

Before:
before

After:
CleanShot 2026-02-24 at 23 20@2x

CleanShot 2026-02-24 at 23 21@2x

Fixes #36732

Wrap milestone and project names in ellipsis spans in the issue/PR sidebar dropdown items and selected rows, and use flex-items-menu in the scrolling menus so long unbroken strings truncate instead of overflowing.

Refs go-gitea#36732
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 24, 2026
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Feb 24, 2026
@lunny
Copy link
Copy Markdown
Member

lunny commented Feb 25, 2026

There should be tips to display the full text.

@WinterCabbage
Copy link
Copy Markdown
Contributor Author

There should be tips to display the full text.

Is this ok?

tooltip-1 tooltip-2

@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 Feb 25, 2026
@lunny lunny added topic/ui Change the appearance of the Gitea UI backport/v1.25 This PR should be backported to Gitea 1.25 labels Feb 25, 2026
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Feb 25, 2026

We should actually make it wrap because broken strings already wrap:

image

So just add tw-break-anywhere to the elements and remove the tooltip (which is bad because it shows unneccesary tooltips even on short texts).

@WinterCabbage
Copy link
Copy Markdown
Contributor Author

silverwind

Got it. Is this wrap version ok?
wrap-sidebar

By the way, what to do with the dropdown menu? The original dropdown menu looks like this:
original-dropdown menu
Should we also make it wrapped or leave it as it is.

@silverwind
Copy link
Copy Markdown
Member

Check how long project names with spaces currently render in that dropdown. If they do ellipsis, just do the same, otherwise wrap.

@WinterCabbage
Copy link
Copy Markdown
Contributor Author

Check how long project names with spaces currently render in that dropdown. If they do ellipsis, just do the same, otherwise wrap.

Currently long projects name with spaces behaves the same as unbroken long projects name in dropdown menu, I will leave them as it is.

Copy link
Copy Markdown
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

Tested, works.

@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 Feb 26, 2026
@silverwind silverwind removed the backport/v1.25 This PR should be backported to Gitea 1.25 label Feb 26, 2026
@silverwind
Copy link
Copy Markdown
Member

No need to backport imho, focus on 1.26 instead.

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 26, 2026
@silverwind silverwind enabled auto-merge (squash) February 26, 2026 19:33
@silverwind silverwind merged commit f9a2a8a into go-gitea:main Feb 26, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 26, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 26, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 27, 2026
* giteaofficial/main:
  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)
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 27, 2026
* 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
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/templates This PR modifies the template files topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overflows in issue sidebar

4 participants