Native browser find (`Ctrl/Cmd+F`) does not search the full diff in diff view
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
Hướng nghiên cứu
Issue không nêu tên file hoặc test, vì vậy hãy bắt đầu bằng cách lần theo triển khai của diff view và các nhánh virtualization, collapsed-section, preview và Load diff. So sánh hành vi hybrid được đề xuất và xác định các test cho native find trên cả các section bị ẩn và đã render; được xem là hoàn tất khi có thể tìm kiếm các kết quả khớp mà không loại bỏ các đặc tính hiệu năng của diff lớn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
In diff view, native browser find only searches content that is currently mounted in the DOM. Today that means Ctrl/Cmd+F can miss valid matches because parts of the diff are intentionally hidden or not rendered:
- Virtualized file blocks outside the viewport are not mounted.
- Auto-collapsed files hide their diff content.
- Rendered previews replace source diff text for renderable files.
- Large diffs may show a
Load diffplaceholder instead of line content. - Omitted context is not present until expanded.
This makes browser find unreliable for reviewing large or mixed-content diffs.
Proposals
- Add a temporary “browser find mode” on
Ctrl/Cmd+Fthat fully renders the diff, expands hidden sections, and forces source view so native browser find can search the whole diff. - Make the normal diff mode always fully searchable by keeping all source diff text mounted in the DOM, even when sections are collapsed or previewed.
- Build an app-level search experience instead of relying on native browser find.
Recommendation
Use a hybrid approach:
- For small diffs, keep the normal mode fully searchable without a separate mode.
- For large diffs, enter a temporary browser-find mode on
Ctrl/Cmd+Fthat fully renders the diff and forces source text visible.
This keeps the common case simple while avoiding the steady-state performance and UI cost of fully rendering large diffs all the time.
Notes
- Native browser find cannot tell us which hidden section matched, so lazy “expand only the matching file” behavior is not practical.
- The hybrid approach preserves current performance characteristics for large diffs while improving searchability for most day-to-day reviews.
- Ngôn ngữ chính
- TypeScript
- Star
- 775
- Fork
- 57
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nilbuild/diffity
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Local Storage for state Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
suggestion: diffity-server Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Tất cả issue của nilbuild/diffity
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
bcgov/bc-wallet-mobile#4761 · 1 bình luận ·
-
external-issue to-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100