[pdf-viewer] Sidebar with page thumbnails

Đang mở
#13,402 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
12/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript

Hướng nghiên cứu

The payload names no source files or tests, so start from the requirement checklist and the open questions, which need a design decision before code. Use the vcf-pdf-viewer demos (thumbnails open and thumbnails listener) as reference for the expected behaviour. Done means each checklist item works, the sidebar is keyboard and screen-reader accessible, and the PR records memory and time-to-first-thumbnail for a 500-page document.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement vaadin-pdf-viewer
Motivation

Part of #7669
Part of vaadin/platform#9815

As a user of a long document, I want small images of the pages, so that one click takes me to the page I need.

Supported by vcf-pdf-viewer add-on: thumnbails open, thumbnails listener.

Requirements
  • Toolbar button shows and hides the sidebar.
  • sidebarOpened boolean property, notify: true fires sidebar-opened-changed.
  • sidebarButtonHidden property to toggle the sidebar button visibility.
  • The sidebar shows one thumbnail for each page, at the start side of the pages.
  • The thumbnail of the current page is marked and stays in view.
  • Click, Enter or Space on a thumbnail goes to its page.
  • The thumbnails have one tab stop. Arrow keys, Home and End move between them.
  • Focus moves to the sidebar button when the sidebar closes or a new document loads.
  • Only thumbnails near the visible part of the list render. A thumbnail out of view frees its canvas and its pdf.js page data.
  • The PR records memory and the time to the first thumbnail for a document with 500 pages.
  • VoiceOver, NVDA, JAWS read each thumbnail as "Page N" and announce which one is current.
  • i18n has the texts sidebar, thumbnails and thumbnailLabel (optional - can use pageLabel)
Out of scope

Related requests to be reported in follow-up issues:

Open questions
  • Is one DOM element for each page fine, or do long documents need a virtual list?
  • Do thumbnails share the render queue of the pages, or keep their own loop at a lower priority?
  • Does Flow need an event when the user picks a thumbnail?
    • Add-on uses addThumbnailClickedListener()
Ngôn ngữ chính
JavaScript
Star
585
Fork
105
Merge trung bình
12 giờ 51 phút
Pull request đã merge (30 ngày)
231

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vaadin/web-components

Tất cả issue của vaadin/web-components

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.