Skip to content

Fix markup content overflow #34072

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

Merged
merged 1 commit into from
Mar 31, 2025
Merged

Fix markup content overflow #34072

merged 1 commit into from
Mar 31, 2025

Conversation

kerwin612
Copy link
Member

@kerwin612 kerwin612 commented Mar 30, 2025

Fix #34069: use overflow-wrap: anywhere to correctly wrap overflowed content.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 30, 2025
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Mar 30, 2025
@techknowlogick techknowlogick added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug topic/ui Change the appearance of the Gitea UI labels Mar 30, 2025
@github-actions github-actions bot removed the modifies/templates This PR modifies the template files label Mar 30, 2025
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 30, 2025

- `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites.
  • SSL_CIPHER_SUITES: ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305: Set the preferred cipher suites.

Maybe it only needs this

image

@kerwin612
Copy link
Member Author

Sorry, an operational error occurred. Reopen now!

@kerwin612 kerwin612 reopened this Mar 31, 2025
@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 Mar 31, 2025
@wxiaoguang wxiaoguang changed the title fixed #34069 Fix markup content overflow Mar 31, 2025
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Mar 31, 2025
@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 Mar 31, 2025
@wxiaoguang wxiaoguang merged commit 0fd5392 into go-gitea:main Mar 31, 2025
47 of 51 checks passed
@wxiaoguang wxiaoguang deleted the patch-1 branch March 31, 2025 03:56
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 1, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  fix users being able bypass limits with repo transfers (go-gitea#34031)
  Improve pull request list api (go-gitea#34052)
  fix(go-gitea#34076):replace assgniee translation key (go-gitea#34077)
  [Fix] Resolve the problem of commit_statuses not being loaded at the top - right when switching files from the file tree (go-gitea#34079)
  Enable testifylint rules (go-gitea#34075)
  Fix markup content overflow (go-gitea#34072)
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this pull request Apr 13, 2025
Fix go-gitea#34069: use `overflow-wrap: anywhere` to correctly wrap overflowed
content.

(cherry picked from commit 0fd5392)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request May 24, 2025
This has been introduced in the cherry-picked commit from go-gitea/gitea#34072

To me, adding this seems to be a bug as it forces a hard stop to any overflow nested within a markup div.

Why should it be removed again?
Because otherwise (wide) markdown tables might look super odd because the column breaking/wrapping logic is strange (likely related to the "anywhere" strategy being used).

- [Example of current state with `overflow-wrap`](https://codefloe.com/devxy/helm-rdepot/src/branch/main/charts/rdepot)
- [Example with `overflow-wrap` being removed](https://codefloe.com/devxy/helm-rdepot/src/branch/main/charts/rdepot)

| Current  | Patched  |
|---------|---------|
| ![image](/attachments/d4a32804-858c-4ed7-838a-30b969bbbf12) | ![image](/attachments/a1261dc2-da25-4d10-b46f-03967fcf57bb) |

The initial change in Gitea was motivated to resolve issues of content overflow caused by the expandable file list tree view they introduced lately. However, this seem to have caused the whole README to overflow in their case, which doesn't apply to Forgejo.

When removing this in Forgejo, only large markdown content (i.e. tables) are allowed to overflow. The whole README div will not overflow (I tested this with an extreme markdown table case).
These tables are then horizontally scrollable, similar to how GitHub handles this.

If the expandable tree view is going to be added to Forgejo, this should then be handled entirely differently. This specific change is not a solution.

I've also checked other value settings to `overflow-wrap` but none had any or any desirable effect.
I did not check all other possible CSS-related options for overflow*, but this might as well be a different task per se.

For the reasons outlined above, I am quite certain this change should be reverted (again).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7945
Reviewed-by: Gusted <[email protected]>
Reviewed-by: Otto <[email protected]>
Co-authored-by: pat-s <[email protected]>
Co-committed-by: pat-s <[email protected]>
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/frontend skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo content overflows in new UI
5 participants