Repository navigation
תיקון issue #4173 — סמן פס הגלילה זז במעבר בין טאבים במסך העיון - #5586
Merged
Merged
Conversation
הסיבה: טאב רקע משחרר את תוכן הספר שמחוץ לחלון הקריאה (55fbd0a). מאז 43ff011 הערכות הגובה של הרשימה נשענות על ספירת התווים של כל שורה, והשחרור מגיע כשינוי מלא בתוכן. הספירה מחדש סימנה כל שורה ששוחררה כ"לא נטענה" ומחקה את הספירה הידועה שלה, וגם הממוצע לשורות שלא נטענו חושב מחדש מחלון הקריאה בלבד. בחזרה לטאב כל ההערכות הוחלפו, אורך הרשימה המשוער השתנה והסמן קפץ; כשהתוכן נטען שוב הסמן חזר למקומו. התיקון: שורה ששוחררה שומרת את הספירה הידועה שלה, והממוצע לשורות שטרם נספרו מחושב מכל הספירות הידועות. ספירה חדשה של שורה טעונה מחליפה כרגיל, וספר אחר או שינוי באורך הספר מאפסים את הספירות כמו קודם.
Y-PLONI
force-pushed
the
fix/scrollbar-thumb-jump-4173
branch
from
November 19, 2026 20:07
f14982e to
13ab902
Compare
2 of 4 tasks
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.
מה היה שבור
במסך העיון (כרטיסיות למעלה, מסך מלא), במעבר מספר אחד לספר אחר וחזרה, סמן פס הגלילה הופיע במקום אחר ואז חזר למקומו. זה נראה כאילו הסמן "ברח" כשהספר היה מוסתר. התיקון ב-#4652 טיפל רק במקרה של מסך הספרייה עם כרטיסיות בצד.
הסיבה
ReadingExtentEstimates), אבל שחרור התוכן נחשב שינוי של כל התוכן. בספירה מחדש כל שורה ששוחררה סומנה "לא נטענה", והספירה שכבר הייתה ידועה לה נמחקה. במקומה נכנס ממוצע, וגם הממוצע חושב מחדש רק לפי חלון הקריאה הקטן.התיקון
ב-
lib/text_book/utils/reading_extent_estimates.dart:ספירה חדשה של שורה טעונה מחליפה את הקודמת כמו קודם. ספר אחר או שינוי באורך הספר מאפסים את הספירות כמו קודם.
Closes #4173
בדיקות
test/tabs/reading_screen_scrollbar_tab_switch_test.dart(חדש): מסך העיון האמיתי עםTextBookBlocאמיתי. גוללים לאמצע ספר, עוברים לכרטיסייה אחרת (התוכן משתחרר) וחוזרים. בודקים שהסמן לא זז. ב-dev הבדיקה נכשלת: הסמן זז מ-433 ל-440.9 פיקסלים.test/text_book/utils/reading_extent_estimates_test.dart(בדיקה חדשה): בספר שחומם רק בחלקו, השחרור לא משנה את הערכות הגובה של שורות ששוחררו, של שורות בחלון ושל שורות שלא נטענו. ב-dev הבדיקה נכשלת.flutter test -j 1 test/tabs test/text_book/utils test/text_book/bloc test/text_book/view test/widgets/scrollable_positioned_list_scrollbar_test.dart:page_shape_super_commentary_wait_test.dart– "מפרש שמור שאינו ברשימה, בלי מפרש-על אפשרי, אינו נתקע בטעינה אינסופית".dart analyzeו-dart format --set-exit-if-changedעל הקבצים ששונו: נקי.dart tool/ui_lint_cli.dart: פלט זהה ל-dev.