-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Web] Fix thread jumps #9111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web] Fix thread jumps #9111
Conversation
Curiously the bug repro's on main but not in prod. Idk what's up with that. |
Yeah wth, that's odd |
It's gotta be either dev/prod difference or a regression since last deploy. Would be good to confirm which is that, and why. I'm not entirely comfortable with the |
Must be something in #8931. RN-for-web doesn't seem to be the culprit. Lot of changes in RN itself of course. It seems that after The intent here is that if I think your concern about the I could also theoretically happen if we're expecting parents to be prepended and after I don't want to claim there aren't other edge cases, but I think this this one is unlikely to happen and recoverable in the case it does. I think your fix is good and we can roll with it for now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I think it's a solid solve, and it was good to revisit this logic. It's been a few months, nice refresher. We'll keep an eye on this in the near future.
* Send inferrable interactions to third-party feeds (bluesky-social#9094) * Fix link crash (bluesky-social#9102) * fix link crash * fix link crash * Log OTA errors properly (bluesky-social#9101) * Log OTA errors properly * filter out network errors * don't send some "activity no longer available" errors (bluesky-social#9100) * remove root sibling library (bluesky-social#9097) * Catch errors on geolocation request, reduce Sentry logs (bluesky-social#9098) * Nightly source-language update * fix gap on profile (bluesky-social#9081) * Update admonition component (bluesky-social#9068) * update admonition component * fix linting, adominition alighment * design tweak * edge cases for admonition, update storybook * Update src/components/Admonition.tsx Co-authored-by: Samuel Newman <[email protected]> * fix mobile version * change button style --------- Co-authored-by: Samuel Newman <[email protected]> * Button tweaks (bluesky-social#9106) * Tweak button colors * Semi bold only for tiny buttons * [Web] Fix thread jumps (bluesky-social#9111) * [Web] Fix thread jumps * Comment formatting --------- Co-authored-by: Eric Bailey <[email protected]> * Add StackedButton component (bluesky-social#9086) --------- Co-authored-by: dan <[email protected]> Co-authored-by: Samuel Newman <[email protected]> Co-authored-by: pfrazee <[email protected]> Co-authored-by: Chenyu <[email protected]> Co-authored-by: Eric Bailey <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ge-selection * origin/main: (29 commits) add patent pledge link to readme (#9118) Fix feedfeedback metrics not distinguishing which feed it's from (#9099) Nightly source-language update Add StackedButton component (#9086) [Web] Fix thread jumps (#9111) Button tweaks (#9106) Update admonition component (#9068) fix gap on profile (#9081) Nightly source-language update Catch errors on geolocation request, reduce Sentry logs (#9098) remove root sibling library (#9097) don't send some "activity no longer available" errors (#9100) Log OTA errors properly (#9101) Fix link crash (#9102) Send inferrable interactions to third-party feeds (#9094) patch react native screens (#9087) fix: remove escapejs and fix profile issues feat: profile.html escapejs feat: post.html structured content, wip feat: profile.html structured content ...
* Send inferrable interactions to third-party feeds (bluesky-social#9094) * Fix link crash (bluesky-social#9102) * fix link crash * fix link crash * Log OTA errors properly (bluesky-social#9101) * Log OTA errors properly * filter out network errors * don't send some "activity no longer available" errors (bluesky-social#9100) * remove root sibling library (bluesky-social#9097) * Catch errors on geolocation request, reduce Sentry logs (bluesky-social#9098) * Nightly source-language update * fix gap on profile (bluesky-social#9081) * Update admonition component (bluesky-social#9068) * update admonition component * fix linting, adominition alighment * design tweak * edge cases for admonition, update storybook * Update src/components/Admonition.tsx Co-authored-by: Samuel Newman <[email protected]> * fix mobile version * change button style --------- Co-authored-by: Samuel Newman <[email protected]> * Button tweaks (bluesky-social#9106) * Tweak button colors * Semi bold only for tiny buttons * [Web] Fix thread jumps (bluesky-social#9111) * [Web] Fix thread jumps * Comment formatting --------- Co-authored-by: Eric Bailey <[email protected]> * Add StackedButton component (bluesky-social#9086) * Nightly source-language update * Fix feedfeedback metrics not distinguishing which feed it's from (bluesky-social#9099) * fix feedfeedback metrics being sent for all feeds * remove `discover:` metrics * add patent pledge link to readme (bluesky-social#9118) * Language selection and suggestion UX improvements (bluesky-social#9067) * feat: don't retain accepted language suggestion after finishing or exiting post (bluesky-social#8886) * feat: don't retain accepted language suggestion after finishing or exiting post * fix: rebase fixes * fix: rebase fixes * chore: lint * Rename onChange for clarity * Improve logic in composer * Handle user override more explicitly * Drill in onSelectLanguage callback into dialog too * Fix typo Co-authored-by: surfdude29 <[email protected]> * Make text crystal clear * Handle multiple languages --------- Co-authored-by: Elijah Seed-Arita <[email protected]> Co-authored-by: surfdude29 <[email protected]> * Tighten up eslint rule to catch unused `const {_} = useLingui()` (bluesky-social#9122) * tighten eslint config to catch unused `useLingui`s * fix now-invalid uses of _ * remove unused function that produces a ton of eslint warnings * upgrade react compiler plugin * [Fix Logouts] Remove buggy hackfix (bluesky-social#9108) * Rip out the network hack in favor of bluesky-social/atproto#4238 * Bump api pkg * Debug code * Revert "Debug code" This reverts commit 38445f3. --------- Co-authored-by: Eric Bailey <[email protected]> * Nightly source-language update * fix: missed alf reversion --------- Co-authored-by: dan <[email protected]> Co-authored-by: Samuel Newman <[email protected]> Co-authored-by: pfrazee <[email protected]> Co-authored-by: Chenyu <[email protected]> Co-authored-by: Eric Bailey <[email protected]> Co-authored-by: Daniel Holmgren <[email protected]> Co-authored-by: Elijah Seed-Arita <[email protected]> Co-authored-by: surfdude29 <[email protected]>
Fixes #9095
This logic is luckily web-only.
To repro, you have to navigate to a reply and then navigate to another one (e.g. upwards).
I don't understand the logic quite enough to tell what's happening, but for some reason we were setting
shouldHandleScroll.current = false
a bit too early. This function runs an extra time in this scenario and we end up missing the last event when we actually should scroll.I changed the condition to what seems to make it work: only stop attempting after one positive scroll. I don't know if this is a perfect heuristic but seems to work at least on Chrome. You'll probably want to test FF, Safari, and Mobile Safari.
Test Plan
I was doing stuff like this. Previously it would lose scroll position.
fix.mov