Skip to content

Keep the first filter section heading visible when scrolling - #1940

Merged
ddennedy merged 1 commit into
mltframework:masterfrom
WMikhail:codex/fix-filter-section-heading
Oct 18, 2026
Merged

ddennedy merged 1 commit into
mltframework:masterfrom
WMikhail:codex/fix-filter-section-heading

Conversation

@WMikhail

Copy link
Copy Markdown
Contributor

Scrolling to the top of a long Filters list currently snaps the first filter row to the top and hides its section heading. Keep the heading visible while preserving row alignment elsewhere by changing only the existing snapMode binding.

Fixes #1933.

Alternatives considered

Several alternatives were tested. Removing SnapToItem fixed the hidden heading but also removed row alignment throughout the list. Sticky section headings worked, but introduced a visible UI change. Adjusting the preferred highlight offset also passed the checks, although it changed alignment throughout the list and depended on row geometry.

Disabling snapping only at the upper boundary fixed the heading but interrupted downward scrolling. Adding an empty header, using a first-row threshold, or correcting the position after movement ended did not reliably resolve the issue.

The selected solution disables snapping while the list is moving or positioned at the very top. After scrolling stops elsewhere, SnapToItem restores row alignment. Including moving prevents snapping from being re-enabled during an active scroll, which would interrupt that movement. This keeps the heading visible and preserves alignment with a change to one existing property.

Validation

All 15 isolated Qt checks passed, covering wheel scrolling, inertia, row alignment, selection, keyboard navigation, scrollbar dragging, and filter reordering.

The checks load the actual AttachedFilters.qml component with a mock model and a minimal Metadata type on Qt 6.8.2, using the Basic controls style, the offscreen platform, and software rendering. The upstream version fails the heading visibility check with an 18-pixel offset; the patched version passes. The temporary test harness is outside the repository and is not included in this PR.

@ddennedy

Copy link
Copy Markdown
Member

I tested and it works. Thank you!

@ddennedy
ddennedy merged commit 1bfec26 into mltframework:master Oct 18, 2026
@ddennedy ddennedy added this to the v26.next milestone Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Bug in list of filters

2 participants