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

Incorrect wrapping on PR comments with long paths #16248

Closed
2 of 6 tasks
parnic-sks opened this issue Jun 25, 2021 · 3 comments · Fixed by #16272 or #19535
Closed
2 of 6 tasks

Incorrect wrapping on PR comments with long paths #16248

parnic-sks opened this issue Jun 25, 2021 · 3 comments · Fixed by #16272 or #19535
Labels
topic/ui Change the appearance of the Gitea UI

Comments

@parnic-sks
Copy link

Description

Comments on files with long paths will not wrap the file name header on a PR if there's no easily-available word boundary to wrap on. This causes the "Outdated" badge and/or "Show Resolved"/"Hide Resolved" links to either overlap other UI elements or be completely obscured, rendering them un-clickable. Note: this is not a contrived example, we ran into this on our project.

Example of a long path with available word boundaries: https://try.gitea.io/parnic-sks/long-paths-test/pulls/1
Example of a long path that doesn't currently wrap: https://try.gitea.io/parnic-sks/long-paths-test-2/pulls/1

Screenshots

Working (valid word boundaries):
image

Not working (no valid word boundaries):
image

Potential fix

Setting word-break: break-word; CSS on one of the segment bits used for PR comment filename headers is one possible way to fix the issue:
image

@noerw noerw added the topic/ui Change the appearance of the Gitea UI label Jun 27, 2021
noerw added a commit to noerw/gitea that referenced this issue Jun 27, 2021
6543 pushed a commit that referenced this issue Jun 27, 2021
* review comments: break-word for long file names

fixes #16248

Co-authored-by: zeripath <art27@cantab.net>
@parnic-sks
Copy link
Author

image

This fix doesn't seem to have taken. The class is now applied at https://try.gitea.io/parnic-sks/long-paths-test-2/pulls/1, but the text still doesn't break.

@parnic-sks
Copy link
Author

image

Also it looks like the Outdated badge will need word-break: normal applied if the parent div has its word-break set to break-word.

@6543 6543 reopened this Jun 29, 2021
@6543
Copy link
Member

6543 commented Jun 29, 2021

#16272 did only fix firefox but in chrome it's still here :X

@6543 6543 changed the title Incorrect wrapping on PR comments with long paths Incorrect wrapping on PR comments with long paths (at Chrome) Jun 29, 2021
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
* review comments: break-word for long file names

fixes go-gitea#16248

Co-authored-by: zeripath <art27@cantab.net>
parnic added a commit to parnic/gitea that referenced this issue Apr 27, 2022
This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome.

Fixes go-gitea#16248
@parnic-sks parnic-sks changed the title Incorrect wrapping on PR comments with long paths (at Chrome) Incorrect wrapping on PR comments with long paths Apr 28, 2022
lafriks pushed a commit that referenced this issue Apr 29, 2022
* Fix word breaks in Chrome

This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome.

Fixes #16248

* Don't break Outdated badge

This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename.

* Move word break to recommended element

* Add overflow-wrap per PR review

* Update web_src/less/helpers.less

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Gusted pushed a commit to Gusted/gitea that referenced this issue Apr 30, 2022
* Fix word breaks in Chrome

This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome.

Fixes go-gitea#16248

* Don't break Outdated badge

This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename.

* Move word break to recommended element

* Add overflow-wrap per PR review

* Update web_src/less/helpers.less

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
parnic-sks pushed a commit to parnic-sks/gitea that referenced this issue May 16, 2022
* Fix word breaks in Chrome

This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome.

Fixes go-gitea#16248

* Don't break Outdated badge

This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename.

* Move word break to recommended element

* Add overflow-wrap per PR review

* Update web_src/less/helpers.less

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 24, 2022
* Fix word breaks in Chrome

This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome.

Fixes go-gitea#16248

* Don't break Outdated badge

This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename.

* Move word break to recommended element

* Add overflow-wrap per PR review

* Update web_src/less/helpers.less

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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
Projects
None yet
3 participants