Skip to content

כמה שיפורים, ותיקון קל#207

Open
palmoni5 wants to merge 25 commits intoOtzaria:migrationDB_V2from
palmoni5:migrationDB_V2
Open

כמה שיפורים, ותיקון קל#207
palmoni5 wants to merge 25 commits intoOtzaria:migrationDB_V2from
palmoni5:migrationDB_V2

Conversation

@palmoni5
Copy link

@palmoni5 palmoni5 commented Mar 6, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

עדכון זה מתמקד בשיפור חווית המשתמש בקוראי הטקסט וה-PDF. הוא מציג יכולת חדשה להסרת סימני פיסוק מטקסט, משפר את הטיפול בבחירת טקסט כדי למנוע ניקוי לא רצוי, ומוסיף פונקציונליות נוחה לשליטה על זום בקובצי PDF. בנוסף, בוצעו שינויים קטנים בממשק המשתמש כדי להפוך אותו לאינטואיטיבי וחלק יותר.

Highlights

  • שיפורי ממשק משתמש כלליים: שופרה אנימציית הצמדת כרטיסיות והוספה תצוגת אחוז זום אינטראקטיבית לקורא PDF, המאפשרת גם עריכה ידנית של הזום.
  • הסרת סימני פיסוק: הוטמעה יכולת חדשה להסיר סימני פיסוק מטקסט בספרי טקסט, כולל אירועי בלוק, עדכוני מצב, הגדרות רינדור ופונקציית עזר חכמה לטיפול בפיסוק.
  • שיפורי בחירת טקסט: שוכתב מנגנון בחירת הטקסט כדי לשפר את האינטגרציה עם SelectionArea ולפתור בעיות של ניקוי בחירה לא רצוי באמצעות טיימר מושהה.
  • תפריט אפשרויות טקסט: כפתור הניקוד בספרי טקסט שודרג לתפריט קופץ המאפשר שליטה נוחה ומשולבת על הסרת ניקוד וגם על הסרת סימני פיסוק.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • lib/navigation/custom_title_bar.dart
    • הוסרה לוגיקה מותנית להצגת אייקון הצמדה.
    • אייקון ההצמדה עוטף כעת ב-AnimatedOpacity כדי לאפשר אנימציית הופעה/היעלמות חלקה.
    • הותאם הריפוד של אייקון ההצמדה.
  • lib/pdf_book/pdf_book_screen.dart
    • נוסף כפתור חדש לסרגל הכלים המציג את אחוז הזום הנוכחי.
    • הוטמעה ווידג'ט _buildZoomPercentageDisplay חדשה המאפשרת להציג ולערוך את אחוז הזום.
    • נוצרה מחלקת _ZoomPercentageDisplay חדשה המנהלת את תצוגת אחוז הזום, כולל שדה טקסט לעריכה וטיפול באירועי זום.
  • lib/text_book/bloc/text_book_bloc.dart
    • נוסף אירוע TogglePunctuation לבלוק.
    • נוספה לוגיקה לטיפול באירוע _onTogglePunctuation לעדכון מצב הסרת סימני הפיסוק.
  • lib/text_book/bloc/text_book_event.dart
    • נוסף אירוע TogglePunctuation חדש עם מאפיין remove מסוג bool.
  • lib/text_book/bloc/text_book_state.dart
    • נוסף מאפיין removePunctuation למצב TextBookLoaded.
    • עודכנו הבנאי, שיטת copyWith, ושיטת props כדי לכלול את המאפיין החדש.
  • lib/text_book/view/combined_view/combined_book_screen.dart
    • נוספו ייבוא של dart:math ו-dart:async.
    • הוסר הייבוא של enhanced_gesture_detector.dart.
    • נוסף Timer לטיפול בניקוי בחירה מושהה.
    • עודכנה שיטת dispose לבטל את ה-Timer.
    • שונתה לוגיקת onSelectionChanged ב-SelectionArea כדי לטפל בניקוי בחירה באמצעות Timer מושהה, למנוע ניקוי בחירה בטרם עת, ולשפר את ה-debug logging.
    • ה-EnhancedGestureDetector הוחלף ב-Listener כדי לאפשר אינטראקציה טובה יותר עם SelectionArea ולטפל בלחיצות עכבר.
    • הוסרה לוגיקת onDragSelectionStart, onDoubleTap, onShiftClick מ-Listener מכיוון ש-SelectionArea מטפל בהן.
    • לוגיקת onSingleTap ו-onSecondaryTapDown הועברה ל-Listener עם התאמות.
  • lib/text_book/view/page_shape/simple_text_viewer.dart
    • הועבר מאפיין removePunctuation ל-RenderSettings בעת רינדור טקסט.
  • lib/text_book/view/selection/enhanced_gesture_detector.dart
    • הוחלף ה-Listener הפנימי ב-GestureDetector רגיל.
    • הוסרו לוגיקות טיפול ב-PointerDownEvent, PointerMoveEvent, PointerUpEvent שהיו קשורות ל-Listener.
    • לוגיקת זיהוי לחיצה בודדת/כפולה ו-Shift+Click הועברה ל-onTap של GestureDetector.
    • הוסרו מאפיינים פנימיים כמו _tapDownPosition, _tapDownButtons, _dragThreshold.
  • lib/text_book/view/text_book_screen.dart
    • כפתור הניקוד הומר מ-IconButton ל-PopupMenuButton.
    • ה-PopupMenuButton כולל כעת אפשרויות להסרת ניקוד ולהסרת סימני פיסוק.
    • עודכנו ה-icon וה-tooltip של הכפתור כדי לשקף את הפונקציונליות המורחבת.
    • נוספה לוגיקה לטיפול בבחירת פריטים בתפריט הקופץ, כולל שליחת אירועי בלוק מתאימים ושמירת הגדרות.
  • lib/utils/text_manipulation.dart
    • נוספה פונקציה חדשה removePunctuation להסרת סימני פיסוק מטקסט, עם לוגיקה מורכבת לשמירת נקודות ונקודתיים בסוף שורות וטיפול בגרשיים.
  • lib/widgets/smart_text/render_settings.dart
    • נוסף מאפיין removePunctuation למחלקת RenderSettings.
    • עודכנו הבנאי, שיטת copyWith, שיטת ==, ו-hashCode כדי לכלול את המאפיין החדש.
  • lib/widgets/smart_text/text_renderer_service.dart
    • שולבה לוגיקת הסרת סימני פיסוק בתהליך רינדור הטקסט.
  • sivan22.crt.bak
    • עודכן לכלול יומני דיבוג הקשורים לבחירת טקסט ושמירת טאבים.
Activity
  • ה-PR כולל יומני דיבוג המעידים על בדיקות ושיפורים במנגנון בחירת הטקסט (SelectionArea.onSelectionChanged) ובשמירת מצב טאבים (DEBUG: שמירת טאב...).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several welcome improvements, especially in the user experience of text selection and the addition of new options like punctuation removal and zoom percentage display. However, it introduces a critical security vulnerability by including debug statements that log user-selected text to the system console, potentially leaking sensitive information. Additionally, a critical issue exists where a certificate backup file (sivan22.crt.bak) was accidentally overwritten with debug logs and committed to the repository. This file must be restored to its original content immediately. I've also included several minor comments for improving code quality and clarity.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances text handling and UI by adding a PDF zoom percentage display and a punctuation removal feature. However, it introduces a critical security and privacy vulnerability: debugPrint statements are logging user-selected text to the console, risking the leakage of sensitive information into system logs. Furthermore, the sivan22.crt.bak file, which contains debug logs and user data, has been accidentally committed and must be removed. Other concerns include a potential compilation error in the PDF code, overly complex logic, and misleading comments.

@palmoni5
Copy link
Author

palmoni5 commented Mar 6, 2026

/gemini review
בעברית

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

ב-Pull Request זה בוצעו מספר שיפורים ותיקונים. בין היתר, שופרה האנימציה של אייקון ההצמדה, נוסף פיצ'ר להצגת ועריכת אחוז הזום ב-PDF, ונוספה אפשרות להסיר סימני פיסוק מהטקסט. בנוסף, בוצע תיקון מורכב לבעיות בבחירת טקסט. בסקירה מצאתי מספר הזדמנויות לשיפור, כולל תיקון קטן ב-CSS, פישוט קוד, והשלמת הפיצ'ר של שמירת הגדרות הפיסוק.

@palmoni5
Copy link
Author

palmoni5 commented Mar 7, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

בסך הכל, מדובר בשינוי מקיף ואיכותי שמוסיף יכולות חדשות ומשפר משמעותית את הקוד הקיים.
השיפורים העיקריים כוללים:

  • תצוגת צורת הדף גמישה: ה-refactor הגדול של תצוגת צורת הדף, המאפשר בחירת מפרשים מרובים לכל חלונית, הוא שיפור אדיר. המעבר למודל PageShapeConfiguration הופך את הקוד להרבה יותר גמיש וקל להרחבה בעתיד.
  • שיפור חווית המשתמש: התיקונים בחווית בחירת הטקסט, במיוחד השימוש ב-Timer למניעת ניקוי שגוי של בחירה, הם שיפור מבורך. גם הוספת האפשרות להזין אחוז זום ידנית ב-PDF והוספת תפריט לאפשרויות טקסט (ניקוד ופיסוק) הן תוספות מצוינות.
  • קוד נקי ומאורגן: ניכר מאמץ רב ב-refactoring של קוד, כמו הוצאת CommentatorsSelectionPanel לווידג'ט נפרד, מה שהופך את הקוד למודולרי וקל יותר לתחזוקה.

מצאתי מספר הערות קטנות לשיפור, אך באופן כללי העבודה מרשימה מאוד.

@palmoni5
Copy link
Author

palmoni5 commented Mar 7, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

זהו Pull Request גדול ומרשים שמכיל שיפורים רבים, תיקונים, וארגון מחדש של הקוד (refactoring).
השינויים העיקריים כוללים:

  • צורת הדף: שכתוב משמעותי של תצוגת "צורת הדף" כדי לתמוך במפרשים מרובים באותה חלונית, יחד עם ממשק הגדרות חדש וגמיש.
  • בחירת טקסט: תיקון משמעותי של בעיות בחירת טקסט, כולל החלפת רכיבים מורכבים במנגנון פשוט ויציב יותר.
  • הסרת פיסוק: הוספת אפשרות חדשה להסיר סימני פיסוק מהטקסט.
  • שיפורי UI: הוספת תצוגת אחוז זום ב-PDF, איחוד תפריטי ניקוד ופיסוק, ואנימציות חלקות יותר.
  • ארגון קוד: הוצאת לוגיקה של בחירת מפרשים לרכיב נפרד לשימוש חוזר, והוספת מבני נתונים חדשים (PageShapeConfiguration) לניהול הגדרות.

העבודה שנעשתה כאן איכותית מאוד ומשפרת את הקוד באופן ניכר. מצאתי בעיה אחת משמעותית בלוגיקה של החלפת מפרשים בתצוגת "צורת הדף", שעלולה לגרום להתנהגות לא צפויה. פרטים מלאים והצעה לתיקון נמצאים בהערה על הקוד.

@palmoni5
Copy link
Author

palmoni5 commented Mar 7, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

בדיקה זו מזהה מספר שיפורים משמעותיים ותיקונים. הוספת האפשרות להסיר סימני פיסוק, יחד עם ממשק משתמש משופר לבחירת אפשרויות טקסט, היא תוספת מבורכת. השינוי המרכזי הוא שכתוב (refactoring) נרחב של תצוגת 'צורת הדף', המאפשר כעת הצגת מספר מפרשים באותה חלונית. המודל החדש PageShapeConfiguration והדיאלוגים המשופרים הופכים את התכונה הזו לחזקה וקלה יותר לתחזוקה. בנוסף, בוצעו שיפורים משמעותיים בלוגיקת בחירת הטקסט כדי לתקן באגים ולשפר את חווית המשתמש. בסך הכל, אלו שינויים מצוינים שמשפרים את הקוד והפונקציונליות של האפליקציה.

@palmoni5 palmoni5 force-pushed the migrationDB_V2 branch 3 times, most recently from 9ec545d to 0182e4f Compare March 11, 2026 21:50
@palmoni5
Copy link
Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new feature for removing punctuation from text, alongside existing nikud removal, with UI controls and per-book settings. It also significantly refactors the 'Page Shape' commentary layout to support multiple commentators per slot, improving flexibility and configuration. Additionally, a new sidebar for links and personal notes is integrated into the page shape view, and PDF viewer settings now persist active commentators and display zoom percentage. Review comments suggest improving color constant definition for better maintainability, addressing a non-intuitive text selection UX in the combined view, and evaluating the necessity and complexity of a newline workaround in the simple text viewer.

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