Skip to content

Fix PDF viewer issues, optimize downloads, improve sidebar behavior, and add reusable announcement component - #518

Open
Rithish-2914 wants to merge 2 commits into
CodeChefVIT:stagingfrom
Rithish-2914:rithish/pdf-fix
Open

Fix PDF viewer issues, optimize downloads, improve sidebar behavior, and add reusable announcement component#518
Rithish-2914 wants to merge 2 commits into
CodeChefVIT:stagingfrom
Rithish-2914:rithish/pdf-fix

Conversation

@Rithish-2914

Copy link
Copy Markdown
Contributor

Purpose

This PR resolves multiple issues related to the PDF viewer, download performance, sidebar behavior, and code quality. It also introduces a reusable announcement component with documentation to improve maintainability and future extensibility.


Corresponding issues

Closes #463
Closes #498
Closes #474
Closes #476

Addresses #461 (issue no longer exists and can be closed if required).

Closes #454


Showcase

  • PDF now starts on the correct page during the initial render.
  • Scroll position resets whenever the PDF page changes.
  • Sidebar sticky behavior is more consistent.
  • Faster downloads when multiple papers are downloaded as a ZIP.
  • New reusable announcement component for advertisements.

Changes

  • Fixed the PDF viewer rendering the first page as page 0.
  • Reset the scroll position after every PDF page change.
  • Improved the sticky behavior of the sidebar.
  • Optimized ZIP generation and download flow for multiple papers.
  • Removed the unnecessary useEffect from CatalogueContent.
  • Created a reusable Announcements.tsx component for advertisements across the Papers platform.
  • Added inline comments to improve readability and maintainability.
  • Added supporting documentation for the announcement component.

Additional Notes

  • No breaking changes.
  • Existing functionality remains unaffected.
  • Performance improvements have been made for bulk downloads.
  • The reusable announcement component is documented for future contributors.

Announcement Component Documentation:
https://docs.google.com/document/d/17kfLUMBDCu6PhcDLx-qtu0C9ZNAshpCSyLsrHHgalM0/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant