BL-14367 speed up initial preloading of selected language#75
Merged
Conversation
nabalone
commented
Mar 1, 2025
Collaborator
Author
nabalone
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions
components/language-chooser/react/common/language-chooser-react-hook/useLanguageChooser.ts line 111 at r1 (raw file):
} // TODO future work: if the selection language is lower in the search results such that its // language card isn't initially visible, we should automatically scroll to it
I've already done this but forgot to delete the comment
components/language-chooser/react/language-chooser-react-mui/src/LanguageChooser.tsx line 417 at r1 (raw file):
> <LazyLoad offset={initialScrollingNeeded ? 1000000 : 500} // Normally, load a 500px buffer under the visible area so we don't have to get the calculation perfect. But if initial scrolling is needed, load everything so we can scroll the appropriate amount
Looks like this was actually unnecessary - when appropriate we scroll to the parent div, and then LazyLoad detects what is in the viewport and renders that, so no need to load all the cards even for initial scrolling
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.
This change is