allenai / pdf-component-library

44 stars 4 forks source link

create priority queue for loading page objectURLs #201

Open ericmarsh995 opened 1 year ago

ericmarsh995 commented 1 year ago

Description

Creates a priority queue for loading objectURLs for all pages. Previously, we only loaded an objectURL once it was visible in the user viewport. Now, we will load all objectURLs from the start, one at a time. They will be loaded in this order: 1. visible pages 2. neighboring pages to the visible pages 3. every other page

Reviewer Instructions

Testing Plan

  1. Tested on all browsers
  2. Ensured that pages were loaded in the right order

Output / Screenshots

NOTE: the console.logs are only apart of the demo video, they havent been committed

Before

https://user-images.githubusercontent.com/108751850/195168031-34aef442-b16a-4da3-b4e5-afd30198bde4.mov

After

https://user-images.githubusercontent.com/108751850/195167084-9cc385aa-d8ac-4a6c-9222-dea376ea73e3.mov

A11y

N/A