Skip to content

feat(ui): fold the thread subject as the thread scrolls - #13543

Open
CreatorOfBiontium wants to merge 2 commits into
nextcloud:mainfrom
CreatorOfBiontium:fix/mobile-thread-header
Open

feat(ui): fold the thread subject as the thread scrolls#13543
CreatorOfBiontium wants to merge 2 commits into
nextcloud:mainfrom
CreatorOfBiontium:fix/mobile-thread-header

Conversation

@CreatorOfBiontium

Copy link
Copy Markdown
Contributor

...also known as the great revival of #11754 (by Claude)

Before (long) After (long) After (short)
Sdílení obrazovky_20260822_020712.webm Sdílení obrazovky_20260822_020820.webm Sdílení obrazovky_20260822_015214.webm

As the title says, folds the thread subject on scroll so there's actually space for reading emails on phones/smaller displays.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

A long subject wrapped over several lines and pushed the message down,
and the sticky header kept those lines on screen for the whole thread.
Fold it to a single line as the thread scrolls instead, tied to the
scroll position rather than to a timer, so that a reader who stops
halfway finds it halfway.

The header hands back the height the subject gives up. Without that,
everything below moves up by as much on top of the scrolling that
caused the fold, and the thread runs away from the finger; it also ties
how fast the subject folds to how fast the thread moves, so neither can
be chosen on its own.

A line is measured in lh rather than --default-line-height, which the
server sets to a bare ratio: subtracting it from a length voids the
declaration it sits in, and the fold never ran at all.

Scroll anchoring is off. The header changing height had the browser
scroll back to compensate, which moved the thread over the mark that
started the fold and unfolded it again, in a loop that got worse the
longer the subject was. That loop is what sank the attempt in nextcloud#11754.

The mobile offsets that compensated for the wrapping subject go with
it, and the subject is indented past the back button that the app
content lays over the header.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Tobiáš Vašťák <tobias.vastak@gmail.com>
Signed-off-by: Tobiáš Vašťák <tobias.vastak@gmail.com>
@ChristophWurst

Copy link
Copy Markdown
Member

Thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants