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

[PDFView] no separate text for loading page #14728

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/PDFView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class PDFView extends Component {
width={pageWidth}
key={`page_${index + 1}`}
pageNumber={index + 1}
loading=""
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add some explanation here or something please? If I saw this here there is nothing that tells me passing the empty string is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marcaaron Sure, I'll add a brief explanation and link to the issue. Should I create a PR for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice but no pressure on you @Prince-Mendiratta. We merged it without this suggestion so the comment is for @aimane-chnaif and @danieldoglas. I really think the root cause of the issue in something to do with the PDF library. If we implement a workaround the least we can do is document with a code comment why it exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries, I'll send in a PR today with the additions!
Yes, makes sense. Finding empty strings passed to a prop should warrant a explanation.

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcaaron Good catch and suggestion. We should make sure to add comment on these kinds of fixes. It was my fault not to ask @Prince-Mendiratta add comment.
@Prince-Mendiratta Thanks in advance for your PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks !

/>
))}
</Document>
Expand Down