mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.39k stars 9.85k forks source link

Add some UI feedback when a PDF fails to load for any reason #16599

Open Rob--W opened 1 year ago

Rob--W commented 1 year ago

The generic errorWrapper was removed in #15533, motivated by code simplification and reducing the translated strings. The result is zero UI feedback when the PDF fails to load/render for any reason.

Examples:

I'd like to restore the UI feedback, at least in the Chrome extension. It doesn't have to be the same as the original, even dumping the raw error message (which are still translated by the way) would suffice.

Rob--W commented 1 year ago

@Snuffleupagus As the author of #15533, what do you think of this? Should this be in the generic viewer UI or be Chrome-specific?

Snuffleupagus commented 1 year ago

As the author of #15533, what do you think of this?

That was done specifically to reduce the amount of code that needs to be maintained. Furthermore, the current behaviour is also consistent across builds since the Firefox PDF Viewer no longer displays any error messages (except the console logging).

There's some discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1795859 about possible surfacing error messages more visibly, hence I very much believe that we should await the conclusion of that bug before re-adding any build-specific code to the viewer for this purpose.

Rob--W commented 1 year ago

Thanks for linking that issue. I'll link this issue from Bugzilla, so that if there is any resolution, it will be mirrored to both issue trackers.

Aditay2002 commented 1 year ago

@Rob--W how can i explore more about the issue?

Rob--W commented 1 year ago

@Rob--W how can i explore more about the issue?

If you are wondering about how to trigger this scenario, see #16271 for manual reproduction steps.

Note that this issue is not yet actionable until a decision has been made (see https://github.com/mozilla/pdf.js/issues/16599#issuecomment-1606071283).

Aditay2002 commented 1 year ago

@Rob--W can you suggest were should i add the UI feedback?

Aditay2002 commented 1 year ago

@Rob--W can you assing this issue to me?I have the solution for it ,should I raise PR ?