Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic to populate agenda viewer on non-mobile devices #1155

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

hancush
Copy link
Collaborator

@hancush hancush commented Aug 13, 2024

Overview

This PR:

  • Fixes a bug in the board report detail page JavaScript that returns the wrong (i.e., empty) full text doc URL
  • Updates the screen size check to use innerWidth rather than screen width, as innerWidth reflects available window size, which is not always the entire screen
  • Adds the screen size check to the event agenda viewer

Connects #1149

Notes

The screen size check is meant to prevent agenda documents from loading on mobile devices in order to reduce bandwidth required to view the site on mobile. The current implementation, however, does not achieve this intent, because it renders the PDF viewer, then hides it via CSS. This update will prevent PDFs from loading at all on small screens, potentially connecting it to #1138.

Testing Instructions

  • View some event and board report detail pages and confirm the PDF viewer works as intended.
  • Repeat step one on a smaller screen and confirm the PDF viewer is not shown.
  • Manually upload an event agenda via URL and document upload, and confirm the PDF is shown correctly.

@fgregg fgregg temporarily deployed to la-metro-cou-fix-1149-c-tmmbar August 13, 2024 17:23 Inactive
@hancush hancush requested a review from antidipyramid August 13, 2024 17:23
@hancush hancush merged commit 16f5480 into main Aug 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants