fix(ui): use overflow:auto to avoid scrollbars when they are not needed #11469

Merged
Gusted merged 1 commit from 0ko/ui-cards-autoscroll into forgejo 2026-03-04 00:36:56 +01:00 AGit
Owner

Closes forgejo/forgejo#11407

I looked at related Gitea discussions for when it was implemented and it looks like what to use exactly for overflow was not discussed, the intention was just to have overflowing content scroll, not to have irrelevant scrollbars appear at all times.

But with max-height restrictions that are in place only horizontal scrollbars are ever needed on demand. Vertical ones are not needed. For this auto works much better than scroll.

Testing

I wasn't able to figure out how to add testdata for this, so I propose to skip for this simple change, unless someone wants to direct me.

A note

SVGs can be used for testdata, but aspect-ratio: 1 needs to be removed. In my testing it does nothing useful and only breaks aspect ratios of SVG attachments.

Preview

With different page scale to demonstrate when the more global scrollbar for the cards list appears. The "after" one in the middle doesn't have one because everything fits max-height without extra horizontal scrollbars.

Before After

Release notes

  • User Interface bug fixes
    • PR: fix(ui): use overflow:auto to avoid scrollbars when they are not needed
Closes forgejo/forgejo#11407 I looked at related Gitea discussions for when it was implemented and it looks like what to use exactly for `overflow` was not discussed, the intention was just to have overflowing content scroll, not to have irrelevant scrollbars appear at all times. - https://github.com/go-gitea/gitea/pull/31683 - https://github.com/go-gitea/gitea/issues/31667 - https://github.com/go-gitea/gitea/pull/26561 But with `max-height` restrictions that are in place only horizontal scrollbars are ever needed on demand. Vertical ones are not needed. For this `auto` works much better than `scroll`. ## Testing I wasn't able to figure out how to add testdata for this, so I propose to skip for this simple change, unless someone wants to direct me. ## A note SVGs can be used for testdata, but `aspect-ratio: 1` needs to be removed. In my testing it does nothing useful and only breaks aspect ratios of SVG attachments. ## Preview With different page scale to demonstrate when the more global scrollbar for the cards list appears. The "after" one in the middle doesn't have one because everything fits max-height without extra horizontal scrollbars. |Before|After| |-|-| |![](/attachments/6302eb3f-13c3-46b6-b630-01381a96bfbd)|![](/attachments/d4c31886-26a4-4f45-81a6-89e6f9e97b66)| <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/11469): <!--number 11469 --><!--line 0 --><!--description Zml4KHVpKTogdXNlIG92ZXJmbG93OmF1dG8gdG8gYXZvaWQgc2Nyb2xsYmFycyB3aGVuIHRoZXkgYXJlIG5vdCBuZWVkZWQ=-->fix(ui): use overflow:auto to avoid scrollbars when they are not needed<!--description--> <!--end release-notes-assistant-->
fix(ui): use overflow:auto to avoid scrollbars when they are not needed
All checks were successful
testing / semgrep/ci (pull_request) Successful in 14s
testing / frontend-checks (pull_request) Successful in 1m10s
testing / backend-checks (pull_request) Successful in 2m54s
testing / test-unit (pull_request) Successful in 7m2s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m9s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m10s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m10s
testing / test-remote-cacher (redict) (pull_request) Successful in 2m9s
issue-labels / cascade (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 26s
requirements / merge-conditions (pull_request) Successful in 6s
testing / test-e2e (pull_request) Successful in 24m39s
testing / test-mysql (pull_request) Successful in 27m2s
testing / test-sqlite (pull_request) Successful in 34m0s
testing / test-pgsql (pull_request) Successful in 38m18s
testing / security-check (pull_request) Successful in 1m28s
issue-labels / backporting (pull_request_target) Has been skipped
milestone / set (pull_request_target) Successful in 30s
d0893acfd8
Closes forgejo/forgejo#11407
Where does that come from? The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/11469.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference.

This message and the release notes originate from a call to the release-notes-assistant.

@@ -23,3 +23,11 @@
 |Before|After|
 |-|-|
-|![](/attachments/6302eb3f-13c3-46b6-b630-01381a96bfbd)|![](/attachments/d4c31886-26a4-4f45-81a6-89e6f9e97b66)|
\ No newline at end of file
+|![](/attachments/6302eb3f-13c3-46b6-b630-01381a96bfbd)|![](/attachments/d4c31886-26a4-4f45-81a6-89e6f9e97b66)|
+
+<!--start release-notes-assistant-->
+
+## Release notes
+<!--URL:https://codeberg.org/forgejo/forgejo-->
+- User Interface bug fixes
+  - [PR](https://codeberg.org/forgejo/forgejo/pulls/11469): <!--number 11469 --><!--line 0 --><!--description Zml4KHVpKTogdXNlIG92ZXJmbG93OmF1dG8gdG8gYXZvaWQgc2Nyb2xsYmFycyB3aGVuIHRoZXkgYXJlIG5vdCBuZWVkZWQ=-->fix(ui): use overflow:auto to avoid scrollbars when they are not needed<!--description-->
+<!--end release-notes-assistant-->

Release notes

  • User Interface bug fixes
    • PR: fix(ui): use overflow:auto to avoid scrollbars when they are not needed
<details> <summary>Where does that come from?</summary> The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/11469.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference. This message and the release notes originate from a call to the [release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant). ```diff @@ -23,3 +23,11 @@ |Before|After| |-|-| -|![](/attachments/6302eb3f-13c3-46b6-b630-01381a96bfbd)|![](/attachments/d4c31886-26a4-4f45-81a6-89e6f9e97b66)| \ No newline at end of file +|![](/attachments/6302eb3f-13c3-46b6-b630-01381a96bfbd)|![](/attachments/d4c31886-26a4-4f45-81a6-89e6f9e97b66)| + +<!--start release-notes-assistant--> + +## Release notes +<!--URL:https://codeberg.org/forgejo/forgejo--> +- User Interface bug fixes + - [PR](https://codeberg.org/forgejo/forgejo/pulls/11469): <!--number 11469 --><!--line 0 --><!--description Zml4KHVpKTogdXNlIG92ZXJmbG93OmF1dG8gdG8gYXZvaWQgc2Nyb2xsYmFycyB3aGVuIHRoZXkgYXJlIG5vdCBuZWVkZWQ=-->fix(ui): use overflow:auto to avoid scrollbars when they are not needed<!--description--> +<!--end release-notes-assistant--> ``` </details> <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/11469): <!--number 11469 --><!--line 0 --><!--description Zml4KHVpKTogdXNlIG92ZXJmbG93OmF1dG8gdG8gYXZvaWQgc2Nyb2xsYmFycyB3aGVuIHRoZXkgYXJlIG5vdCBuZWVkZWQ=-->fix(ui): use overflow:auto to avoid scrollbars when they are not needed<!--description--> <!--end release-notes-assistant-->
Beowulf approved these changes 2026-03-03 21:04:57 +01:00
Gusted approved these changes 2026-03-04 00:36:33 +01:00
Gusted merged commit 8d6812df25 into forgejo 2026-03-04 00:36:56 +01:00
Sign in to join this conversation.
No reviewers
No labels
arch
riscv64
backport/v1.19
backport/v1.20
backport/v1.21/forgejo
backport/v10.0/forgejo
backport/v11.0/forgejo
backport/v12.0/forgejo
backport/v13.0/forgejo
backport/v14.0/forgejo
backport/v7.0/forgejo
backport/v8.0/forgejo
backport/v9.0/forgejo
breaking
bug
bug
confirmed
bug
duplicate
bug
needs-more-info
bug
new-report
bug
reported-upstream
code/actions
code/api
code/auth
code/auth/faidp
code/auth/farp
code/email
code/federation
code/git
code/migrations
code/packages
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
certmagic
dependency
chart.js
dependency
Chi
dependency
Chroma
dependency
citation.js
dependency
codespell
dependency
css-loader
dependency
devcontainers
dependency
dropzone
dependency
editorconfig-checker
dependency
elasticsearch
dependency
enmime
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Git
dependency
git-backporting
dependency
Gitea
dependency
gitignore
dependency
go-ap
dependency
go-enry
dependency
go-gitlab
dependency
Go-org
dependency
go-rpmutils
dependency
go-sql-driver mysql
dependency
go-swagger
dependency
go-version
dependency
go-webauthn
dependency
gocron
dependency
Golang
dependency
goldmark
dependency
goquery
dependency
Goth
dependency
grpc-go
dependency
happy-dom
dependency
Helm
dependency
image-spec
dependency
jsonschema
dependency
KaTeX
dependency
lint
dependency
MariaDB
dependency
Mermaid
dependency
minio-go
dependency
misspell
dependency
Monaco
dependency
PDFobject
dependency
playwright
dependency
postcss
dependency
postcss-plugins
dependency
pprof
dependency
prometheus client_golang
dependency
protobuf
dependency
relative-time-element
dependency
renovate
dependency
reply
dependency
ssh
dependency
swagger-ui
dependency
tailwind
dependency
temporal-polyfill
dependency
terminal-to-html
dependency
tests-only
dependency
text-expander-element
dependency
urfave
dependency
vfsgen
dependency
vite
dependency
Woodpecker CI
dependency
x tools
dependency
XORM
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/branding
forgejo/ci
forgejo/commit-graph
forgejo/documentation
forgejo/furnace cleanup
forgejo/i18n
forgejo/interop
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
Gain
High
Gain
Nice to have
Gain
Undefined
Gain
Very High
good first issue
i18n/backport-stable
impact
large
impact
medium
impact
small
impact
unknown
Incompatible license
issue
closed
issue
do-not-exist-yet
issue
open
manual test
Manually tested during feature freeze
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
problem
QA
regression
release blocker
Release Cycle
Feature Freeze
release-blocker
v7.0
release-blocker
v7.0.1
release-blocker
v7.0.2
release-blocker
v7.0.3
release-blocker
v7.0.4
release-blocker
v8.0.0
release-blocker/v9.0.0
run-all-playwright-tests
run-end-to-end-tests
test
manual
test
needed
test
needs-help
test
not-needed
test
present
untested
User research - time-tracker
valuable code
worth a release-note
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/forgejo!11469
No description provided.