allenai / pdf-component-library

44 stars 4 forks source link

Adding loading message for page that has a lot of image in PDF Component #171

Closed huytr1995 closed 2 years ago

huytr1995 commented 2 years ago

Description

Ref: https://github.com/allenai/scholar/issues/33272 Figma: https://www.figma.com/file/2gUmD3D8tz6gnm9rsYgj6J/Semantic-Reader?node-id=3567%3A38013

Part 2 of the above ticket. After rendering the test first and while image is still loading, based on @ctrier design we will wrap the page in a yellow box with a text box in the middle to indicate its loading.

Reviewer Instructions

After rendering the test first and while image is still loading, based on @ctrier design we will wrap the page in a yellow box with a text box in the middle to indicate its loading. Now the message box in top middle of the page is just empty because i will pass a content to that box to show it.

Testing Plan

Since the PDF Component test paper loads so fast so i set the isBuildingPageImage to be true to show the UI. And verify it works in Prod too.

Output / Screenshots

Local image

Prod

https://user-images.githubusercontent.com/84343285/186023718-a09c5b11-1e2d-4854-bf53-196ccdc511ce.mov

A11y

No A11y involvement