[Fenix PDF] Make pdfs from Fenix downloads open in Fenix
Categories
(Firefox for Android :: General, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | verified |
People
(Reporter: rsainani, Assigned: npoon)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][group4])
Attachments
(3 files)
Consider adding a preference that allows user to enable/disable opening pdfs from Fenix in Fenix by default. This would give them the choice and would result in a much smoother experience for usecases like pdfs being opened from downloads.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
Based on discussion from UX and the PDF team, we have decided to open PDFs from Fenix in Fenix, as this mirrors the behaviour in desktop. Changing the title to reflect this.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
•
|
||
Hello, this affects some UI tests in how we handle or expect to handle intent handling of opening downloaded PDFs as they are now failing on autoland.
https://firefox-ci-tc.services.mozilla.com/tasks/LUk4eDz4QOunYkiqo6WMyA
verifyPDFViewerDownloadButtonTestin org.mozilla.fenix.ui.PDFViewerTestsaveAsPdfFunctionalityTestin org.mozilla.fenix.ui.DownloadTestsaveAsPdfFunctionalityTestin org.mozilla.fenix.ui.RedesignedNavigationToolbarSmokeTest
As these also failed on your Try https://treeherder.mozilla.org/jobs?repo=try&revision=117dbdb8443c384c60c1defcc03bf4299d8d9057&selectedTaskRun=DfzOPMEaQOauWHycryPocw.0
I believe these tests previously expected com.google.android.apps.docs to handle the PDF on Open, so we need to assert that Firefox remains in foreground.
https://searchfox.org/mozilla-central/source/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/DownloadTest.kt#354
https://searchfox.org/mozilla-central/source/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PDFViewerTest.kt#61
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
Thanks for the breakdown :aaronmt! As discussed offline, we have agreed to disable these tests temporarily for investigation
Comment 8•1 year ago
|
||
| bugherder | ||
Comment 9•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 10•1 year ago
|
||
Can QA please verify the change?
We want to verify that opening a PDF from the following methods should open the PDF from fenix:
- After successfully downloading a PDF, there is a dialog shown at the bottom of the screen, showing an option to open the downloaded file. Click the open button.
- After successfully downloading a PDF, there is a notification showing that the download has completed. Clicking on this download should open this PDF from within fenix.
- Opening any downloaded PDF from fenix through Menu > Downloads should open the PDF from fenix.
It would be great if we can test 1 and 2 in custom tabs as well.
We also want to verify that the behaviour has not changed elsewhere. Specifically, if the user tries to open any PDF from their file explorer, the default PDF opener should be used or there should be a prompt to select which app to use to open the PDF (if a default hasn't been set)
Comment 11•1 year ago
|
||
Hi,
I've verified the above mentioned scenarios:
- After successfully downloading a PDF, the open button from the dialog shown at the bottom of the screen, opens the PDF file in the browser.
- After successfully downloading a PDF, tapping on the notification showing that the download has completed, opens the PDF file in Fenix.
- Opening any downloaded PDF from fenix through Menu > Downloads opens the PDF in Fenix.
- Adding the page as custom tab, then downloading the PDF file behaves the same way as the normal tab on opening the file through the notification or through the open button from the dialog.
- There's an occasional error on custom tab, saying "App isn't installed" when trying to open it, I don't know if that has any connection with the change made here, but there are no issues regarding downloading and opening a PDF file.
- Opening a PDF file through the file explorer, is as mentioned above, if the PDF reader app is installed, it is opened in that app, if not, there is a prompt to select which app to use to open the PDF.
Tested build: Firefox Nightly 134.0a1 from 2024-11-01.
Tested devices: Samsung Galaxy S23 Ultra (Android 14) and Google Pixel 9 Pro XL (Android 14).
Marking the ticket as verified on 134.
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Description
•