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 for analysis plugin #1549

Merged
merged 5 commits into from
Nov 7, 2024
Merged

Conversation

Dinika
Copy link
Contributor

@Dinika Dinika commented Nov 6, 2024

This PR is needed to complete the react migration.

The Analysis plugin cypress test was failing because the Analysis plugin was not working.
The plugin was not working because react-pdf was not able to render pdf.

To make the rendering work these changes were needed:

  • react-pdf to be updated
  • wait for the Document to be ready before rendering the Page
  • Update node version so that the tests pass with this latest version of react-pdf (the new version uses some APIs that are not available in older node versions - related issue)
  • With node updated, cypress had to be updated too.

How has this been tested?

  • cypress tests to upload, edit and preview pdfs in analysis plugin

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added necessary unit and integration tests.
  • I have added screenshots (if applicable), in the comment section.

The newer version of react-pdf needd to wait for the pdf Document to be
loaded before the Page is displayed.
As suggested here the react-pdf workers use functions that are not
availalbe on older node versions

elizaOS/eliza#76

Signed-off-by: Dinika Saxena <dinikasaxenas@gmail.com>
Signed-off-by: Dinika Saxena <dinikasaxenas@gmail.com>
@Dinika Dinika force-pushed the fix-analysis-plugin branch from 217d723 to 2241e63 Compare November 7, 2024 13:25
@Dinika Dinika force-pushed the fix-analysis-plugin branch from a156e5e to 2875b7c Compare November 7, 2024 16:10
Signed-off-by: Dinika Saxena <dinikasaxenas@gmail.com>
@Dinika Dinika force-pushed the fix-analysis-plugin branch from 2875b7c to ee4ec05 Compare November 7, 2024 16:14
@Dinika Dinika merged commit 86d3da2 into migration-merge Nov 7, 2024
5 checks passed
@Dinika Dinika deleted the fix-analysis-plugin branch November 7, 2024 16:43
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.

2 participants