fix(ui): don't allow comment boxes to stretch outside diff boundries on small device UI (#9052)

The context menu of the comment box was not always available  on a mobile-sized device, because it would escape its container, overlap other elements, and be unable to be clicked.
To address this, I've made the comment box constrained to the width of the diff box.

This allows Playwright to interact with the element without ambiguity of the click targets, avoiding any "intercepts pointer events".

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9052
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
This commit is contained in:
Mathieu Fenniak 2025-08-29 21:32:50 +02:00 committed by Beowulf
commit 11218ac43c
2 changed files with 51 additions and 57 deletions

View file

@ -98,7 +98,6 @@
}
.comment-code-cloud .comments .comment .avatar {
width: auto;
float: none;
margin: 0 0.5rem 0 0;
flex-shrink: 0;
}
@ -111,9 +110,6 @@
.comment-code-cloud .comments .comment .comment-content {
margin-left: 0 !important;
}
.comment-code-cloud .comments .comment .comment-container {
width: 100%;
}
.comment-code-cloud .comments .comment.code-comment {
padding: 0 0 0.5rem !important;
}