Skip to content

Remove or Replace css break-all in small areas #31636

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

Closed
SimonPistache opened this issue Jul 15, 2024 · 5 comments · Fixed by #31637
Closed

Remove or Replace css break-all in small areas #31636

SimonPistache opened this issue Jul 15, 2024 · 5 comments · Fixed by #31637
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@SimonPistache
Copy link
Contributor

Description

Hello!

On the sidebar of an issue, the Milestones (and Projects) section can be long enough to fit on multiples lines:
Capture d’écran 2024-07-15 à 16 16 06

However, the text is wrapped immediately, due to the word-break: break-all; property. I suggest to set it to a more gentle break like word-break: break-word; or just use the default behaviour:
Capture d’écran 2024-07-15 à 16 16 48

We could also rely on the text-overflow: ellipsis; CSS rule to truncate the text and leave it on 1 line, though it's a little more tricky to implement it with the flexbox.
Capture d’écran 2024-07-15 à 16 25 21

What do you think?

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker latest from DockerHub

Database

SQLite

@silverwind
Copy link
Member

Should likely use overflow-wrap: anywhere instead of word-break: break-all there because the former does not break inside words unless it absolutely has to.

@silverwind
Copy link
Member

#31637

@SimonPistache
Copy link
Contributor Author

Organisations descriptions have that break anywhere as well:

Capture d’écran 2024-07-15 à 20 57 34

tested on both my instance 1.22 and on 1.23.0+dev-322-g0bb4c1cde2

@SimonPistache
Copy link
Contributor Author

Toying with the devtools:

.page-content.organization #org-info {
  /*! overflow-wrap:anywhere; */
  flex:1;
  /*! word-break:break-all; */
}

Capture d’écran 2024-07-15 à 21 02 35

that fix the issues by letting the .markup overrules #org-info.

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Jul 15, 2024
@silverwind
Copy link
Member

silverwind commented Jul 15, 2024

I handled org description in #31637 as well. Not sure about overflow-wrap cases. All remaining cases of break-all are code rendering and there is it welcome I guess.

GiteaBot added a commit to GiteaBot/gitea that referenced this issue Jul 18, 2024
Fixes: go-gitea#31636

1. Issue sidebar topic is disussed in
go-gitea#31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: Giteabot <teabot@gitea.io>
silverwind added a commit that referenced this issue Jul 18, 2024
Backport #31637 by @silverwind

Fixes: #31636

1. Issue sidebar topic is disussed in
#31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: silverwind <me@silverwind.io>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Jul 23, 2024
Fixes: go-gitea/gitea#31636

1. Issue sidebar topic is disussed in
go-gitea/gitea#31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 0c1127a2fb4c07576b4a2e4cffbcd2b0c8670a27)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 15, 2024
richmahn pushed a commit to unfoldingWord/dcs that referenced this issue Mar 2, 2025
Fixes: go-gitea/gitea#31636

1. Issue sidebar topic is disussed in
go-gitea/gitea#31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: Giteabot <teabot@gitea.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants