Closed Bug 1710941 Opened 4 years ago Closed 4 years ago

Avoid showing "Unknown content" dialog for download, unless user spefically set it

Categories

(Firefox :: Downloads Panel, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: mtigley, Assigned: ava8katushka)

References

Details

Attachments

(1 file)

We want to avoid always prompting the user with the "What should Firefox do with this file" dialog when initiating a download, unless the user has "always ask" set to true. If the user has "always ask" set to true, then we should always prompt them with the download filepicker (even if they have a specific file type set to "always open with X").

Currently, we have two variables preferredAction and alwaysAskBeforeHandling to indicate whether or not we prompt the user.

Priority: -- → P3
Type: defect → enhancement
Assignee: nobody → ava8katushka
Status: NEW → ASSIGNED

Does it mean we don't want to show the dialog ever?
How we decide what to do with file: save to the folder, open with app?

Flags: needinfo?(tigleym)

(In reply to Ava Katushka from comment #1)

Does it mean we don't want to show the dialog ever?

We only want to set the default option to "Save to Disk" for the unknownContentTypeWindow dialog (i.e: the dialog displayed when handling LaunchWithApplication downloads). And we only want to show it when the "Always Ask" option is enabled from about:preferences under the "Files and Applications" section. Setting this preference from there also sets the "browser.download.useDownloadDir" to false, so that means we might have to check that "browser.download.useDownloadDir" is true before deciding whether or not we show it.

How we decide what to do with file: save to the folder, open with app?

With the current plan, neither of those options will be available to the user since the user is no longer prompted, and will instead save the file directly to disk. I think this is fine since those options are available to the user when the "Always Ask" option is enabled.

So to summarize: if the user doesn't have their downloads set to "always ask" we just save to disk. We may add the option to open the file automatically (see bug 1711053) to handle the case where the user wants to launch the file after it's finished.

Flags: needinfo?(tigleym)
Attachment #9226109 - Attachment description: Bug 1710941 - Show "What I should do with this file?" dialog only if user set alwaysAsk to true. r?mtigley → Bug 1710941 - Show UnknownContentType dialog only if user set alwaysAsk to true. r?mtigley
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5fc41ac00d90 Show UnknownContentType dialog only if user set alwaysAsk to true. r=mtigley

Backed out for causing mochitest failures in browser_download_skips_dialog

Backout link: https://hg.mozilla.org/integration/autoland/rev/ae2d4704c3a7a00708d4bc873d4578ec21ecd6a7

Push with failures

Failure log

Flags: needinfo?(ava8katushka)

It looks like there a race between opening the new tab and when we shut down the test. We'll have to make sure that the new tab is finished opening once the download has finished.

Flags: needinfo?(ava8katushka)
Attachment #9226109 - Attachment description: Bug 1710941 - Show UnknownContentType dialog only if user set alwaysAsk to true. r?mtigley → Bug 1710941 - Show "What I should do with this file?" dialog only if user set alwaysAsk to true. r?mtigley
Attachment #9226109 - Attachment description: Bug 1710941 - Show "What I should do with this file?" dialog only if user set alwaysAsk to true. r?mtigley → Bug 1710941 - Show UnknownContentType dialog only if user set alwaysAsk to true. r?mtigley
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ebb5912bb0e Show UnknownContentType dialog only if user set alwaysAsk to true. r=mtigley
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Summary: Make "Save to disk" the default decision for files → Avoid showing Unknown content dialog for download, unless user spefically set it
Summary: Avoid showing Unknown content dialog for download, unless user spefically set it → Avoid showing "Unknown content" dialog for download, unless user spefically set it
Regressions: 1738448
Regressions: 1742754
Blocks: 453455
Blocks: 1689666
Blocks: 1756980
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: