Repository navigation
Bring the full-size logo back on an upward scroll on mobile - #246
Merged
Merged
Conversation
#240 merged the mobile and desktop scroll paths into one absolute threshold, which dropped the behaviour production has below 785px: the full-size logo returns on any upward scroll rather than only at the top of the page. The partner asked for production's behaviour to be kept. Three cases could leave the logo stuck small. The handler runs once per animation frame, so a single frame can swallow a whole flick, and recording the turning point where the frame landed rather than at the peak it turned from made the restore unreachable after a back-to-top jump, a hard flick up from just below the fold, or iOS overscroll reporting a negative position. It now records the peak, clamps the position at zero, and clears the peak on the wide path so a rotation cannot carry a stale one. matchMedia replaces the innerWidth read, so crossing 784px re-decides instead of waiting for the next scroll event. No CSS changed. The bar keeps its height at every width, so the logo row and the menu button stay where they are. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rCHPCdbV5C5dDJjEmMDuy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #
Proposed changes
Why are these changes being made?
#240 merged the mobile and desktop scroll paths into one absolute threshold. That dropped the behavior production has below 785px, where the full-size logo comes back on any upward scroll instead of only at the top of the page. The partner asked for production's behavior to be kept (T51ENG-2081).
Testing instructions
🤖 Generated with Claude Code
https://claude.ai/code/session_011rCHPCdbV5C5dDJjEmMDuy