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: PDF viewer refreshes when interacting with web UI #2276

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

MattWong-ca
Copy link
Contributor

@MattWong-ca MattWong-ca commented Oct 13, 2024

In Files, the PDF viewer was re-rendering when interacting with web UI.

In FilesPage.js, MainView is defined as a new component inside the FilesPage component, so clicking UI elements around the PDF re-renders MainView (and since MainView contains the logic that shows the file preview component, the preview re-renders). Issue seemed to only affect PDFs.

Fix: creating and using a new file preview component defined outside of FilePages. Not sure if this is the cleanest approach, so I'm open to suggestions!

Closes #2145

PDF.Viewer.mov

@MattWong-ca MattWong-ca requested a review from a team as a code owner October 13, 2024 17:15

This comment was marked as resolved.

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MattWong-ca, this looks like a sensible fix.

I confirmed this not only fixes PDF preview, but also Video (it no longer get interrupted).

@lidel lidel merged commit 32ef5a2 into ipfs:main Oct 16, 2024
22 checks passed
ipfs-gui-bot pushed a commit that referenced this pull request Oct 16, 2024
## [4.3.3](v4.3.2...v4.3.3) (2024-10-16)

 CID `bafybeid4uxz7klxcu3ffsnmn64r7ihvysamlj4ohl5h2orjsffuegcpaeq`

 ---

### Bug Fixes

* file viewer refreshes when interacting ([#2276](#2276)) ([32ef5a2](32ef5a2))

### Trivial Changes

* pull transifex translations ([#2270](#2270)) ([1ff4971](1ff4971))
@ipfs-gui-bot
Copy link
Collaborator

🎉 This PR is included in version 4.3.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome.. thanks a ton for this @MattWong-ca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF Viewer Refreshes when interacting with webui
4 participants