Skip to content

Conversation

@alltheseas
Copy link
Collaborator

Summary

This PR adds several improvements to the longform article reading experience:

  • Reading progress bar - Visual indicator of scroll position through longform articles
  • Estimated read time - Shows reading time in minutes instead of just word count
  • Sepia mode & line height - Comfortable reading settings with warm tones and adjustable spacing
  • Focus mode - Auto-hide navigation when scrolling for distraction-free reading
  • Image fixes - Properly sized images that don't get stretched or cut off

Relation to #3489: The first commit in this PR includes the same image fix from #3489. This PR bundles that fix with additional longform UX improvements.

Checklist

Standard PR Checklist

Test report

Device: iPhone 17 Pro (Simulator)

iOS: iOS 26.2

Damus: feature/longform-reading-ux branch

Setup: Tested with various longform articles (kind 30023) from different authors

Steps:

  1. Open a longform article from timeline or search
  2. Scroll through article - verify progress bar updates
  3. Check estimated read time displays correctly
  4. Enable sepia mode in settings - verify warm tones applied
  5. Adjust line height slider - verify spacing changes
  6. Scroll down in article - verify nav/tab bars hide
  7. Tap screen - verify chrome restores
  8. Switch to non-longform event in thread - verify tab bar restores
  9. Test images in longform content - verify proper sizing

Results:

  • PASS

Other notes

Screenshots of the changes are available in the related issues. Each commit is a logical unit that can be reviewed independently.

Pre-process markdown with ensureBlockLevelImages() to add paragraph breaks
around standalone images, forcing proper block-level parsing. Creates
KingfisherImageProvider for MarkdownUI to handle proper aspect ratio and
image caching.

Changelog-Fixed: Fixed stretched/cut-off images in longform notes

Signed-off-by: alltheseas <[email protected]>
Display a thin purple progress bar at top of longform articles (kind 30023)
that tracks scroll position through the content. Uses top/bottom GeometryReader
trackers to measure content bounds and calculates progress linearly.

Closes: damus-io#3494
Changelog-Added: Added reading progress bar for longform articles

Signed-off-by: alltheseas <[email protected]>
Display estimated reading time in minutes alongside word count for longform
articles. Uses standard 200 words per minute reading rate calculation.

Closes: damus-io#3492
Changelog-Added: Added estimated read time to longform preview

Signed-off-by: alltheseas <[email protected]>
Add settings for longform article reading experience:
- Sepia mode toggle for comfortable reading with warm tones
- Line height slider (1.2-2.0x) for adjustable text spacing
Both settings persist and apply to the full longform article view.

Closes: damus-io#3495
Changelog-Added: Added sepia mode and line height settings for longform articles

Signed-off-by: alltheseas <[email protected]>
When viewing the full article (not truncated), remove the card border and
background styling for a cleaner reading experience. Card styling is now
only shown in truncated preview mode (timeline, search results).

Changelog-Changed: Removed card styling from longform preview in full article view

Signed-off-by: alltheseas <[email protected]>
When reading longform articles, scrolling down hides the navigation bar and
tab bar for a distraction-free reading experience. Tap anywhere to restore
the chrome, or it automatically restores when leaving the view.

Closes: damus-io#3493
Changelog-Added: Added focus mode with auto-hide navigation for longform reading

Signed-off-by: alltheseas <[email protected]>
…rm event

Restore chrome (nav bar + tab bar) when user taps to select a different
event in thread view. Previously the tab bar could stay hidden because
updateChromeVisibility short-circuits when isLongformEvent is false.

Changelog-Fixed: Fixed tab bar staying hidden when switching from longform to non-longform event

Signed-off-by: alltheseas <[email protected]>
Previously scrolling up would restore the nav/tab bars. Now only tapping
restores chrome, giving a cleaner reading experience without accidental
restoration while scrolling.

Changelog-Changed: Changed focus mode to only hide navigation on scroll down

Signed-off-by: alltheseas <[email protected]>
The conditions !blur_images || (!blur_images && X) simplify to just
!blur_images, and the else branch covers the blur_images case.

Signed-off-by: alltheseas <[email protected]>
@alltheseas
Copy link
Collaborator Author

alltheseas commented Jan 5, 2026

test on a longform article!

scroll up, scroll down

image

tinker with

  1. line height,
  2. sepia mode

in settings -> appearance
Screenshot 2026-01-04 at 6 30 54 PM

toggle between dark, and light mode

@alltheseas
Copy link
Collaborator Author

cc @BenGWeeks

@BenGWeeks
Copy link
Contributor

Will take a look at this next week.

@danieldaquino danieldaquino added the pr-in-queue This PR is waiting in a queue behind their other PRs marked with the label `pr-active-review`. label Jan 5, 2026
@jb55
Copy link
Collaborator

jb55 commented Jan 6, 2026

trying now

@jb55 jb55 added pr-active-review This PR is actively being reviewed, or is next on the list to be reviewed. and removed pr-in-queue This PR is waiting in a queue behind their other PRs marked with the label `pr-active-review`. labels Jan 6, 2026
@jb55
Copy link
Collaborator

jb55 commented Jan 6, 2026

nice, works great. added to integration queue

@jb55 jb55 added pr-in-merge-queue The PR has been reviewed, tested, and added to an integration branch. Will be merged soon. and removed pr-active-review This PR is actively being reviewed, or is next on the list to be reviewed. labels Jan 6, 2026
jb55 pushed a commit that referenced this pull request Jan 6, 2026
Pre-process markdown with ensureBlockLevelImages() to add paragraph breaks
around standalone images, forcing proper block-level parsing. Creates
KingfisherImageProvider for MarkdownUI to handle proper aspect ratio and
image caching.

Changelog-Fixed: Fixed stretched/cut-off images in longform notes
Closes: #3496
Signed-off-by: alltheseas <[email protected]>
Signed-off-by: William Casarin <[email protected]>
jb55 pushed a commit to jb55/damus that referenced this pull request Jan 6, 2026
Pre-process markdown with ensureBlockLevelImages() to add paragraph breaks
around standalone images, forcing proper block-level parsing. Creates
KingfisherImageProvider for MarkdownUI to handle proper aspect ratio and
image caching.

Changelog-Fixed: Fixed stretched/cut-off images in longform notes
Closes: damus-io#3489
Closes: damus-io#3496
Signed-off-by: alltheseas <[email protected]>
Signed-off-by: William Casarin <[email protected]>
@jb55 jb55 mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

longform pr-in-merge-queue The PR has been reviewed, tested, and added to an integration branch. Will be merged soon. ui usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

longform settings: line height + sepia mode longform: reading progress bar longform: focused mode longform: display reading time in minutes

4 participants