Skip to content

New feature: Immersion Mode#1228

Merged
dfsm merged 16 commits intomainfrom
immersion-mode-final
Apr 17, 2026
Merged

New feature: Immersion Mode#1228
dfsm merged 16 commits intomainfrom
immersion-mode-final

Conversation

@dfsm
Copy link
Copy Markdown
Contributor

@dfsm dfsm commented Nov 15, 2025

  • Toggle to enable while in postspageview via Page Settings or regular Settings screen
  • While scrolling, top and bottom bars will scroll away. Top bars will scroll up, bottom bars will scroll down.
  • When reaching the bottom of the page, bars will scroll back into position

Note: Ideally merge this one last out of all the current PRs

dfsm added 9 commits November 15, 2025 20:28
- Toggle to enable while in postspageview via Page Settings or regular Settings screen
- While scrolling, top and bottom bars will scroll away. Top bars will scroll up, bottom bars will scroll down.
- When reaching the bottom of the page, bars will scroll back into position
@dfsm dfsm requested a review from nolanw November 15, 2025 11:31
dfsm added 7 commits January 7, 2026 11:37
…om of the scroll. Previously bars would scroll back into place but this would only succeed in reaching their destination position about 80% of the time. Now the bars will fade back into view already in position. Sliding behaviour still applies to disappearing at the top of the scroll and returning when not at the bottom.
  dead Awful.scrollToPostWithID JS hook
- Replace empty if #available(iOS 26.0, *) {} else branches with
  if #unavailable(iOS 26.0) in PostsPageViewController toolbar items
- Delete redundant exitImmersiveMode() and resetNavigationBarState()
  wrappers; the manager already resets transforms and never hides
  the nav bar, so the extra reset and isNavigationBarHidden branch
  were unreachable
- Inline single-use safeAreaGradientView computed property in
  PostsPageView
- Drop obvious "Configure the immersive mode manager" comment and
  trailing whitespace in Settings.swift

  Cache scroll-driven nav bar appearance resources

updateNavigationBarTintForScrollProgress rebuilds a
UINavigationBarAppearance on every scroll delta above 0.005. Cache
the expensive pieces so scroll-driven updates don't re-allocate or
redraw identical resources each frame.

- Cache the gradient background image by color; invalidate in
  themeDidChange. Replaces a UIGraphicsImageRenderer + CGGradient
  draw on every mid-scroll event.
- Lazy-cache the two back-indicator variants (template and
  .label-tinted .alwaysOriginal). The .label variant stays dynamic
  because .label is a system-dynamic color, so no invalidation
  needed on trait changes.
- Snap progress to 0 or 1 outside the atTop/fullyScrolled thresholds
  before the delta-gate check, so oscillations around the boundaries
  stop triggering redundant appearance rebuilds.
@dfsm dfsm merged commit cd3cf66 into main Apr 17, 2026
1 check failed
@dfsm dfsm deleted the immersion-mode-final branch April 17, 2026 11:08
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.

1 participant