Closed Bug 1719901 Opened 3 years ago Closed 3 years ago

"Save file as..." file picker should show instead of the UnknownContentType dialog

Categories

(Firefox :: Downloads Panel, defect, P3)

defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: mtigley, Assigned: ava8katushka)

References

Details

Attachments

(1 file)

Steps to Reproduce

  1. Ensure browser.download.improvements_to_download_panel pref is set to true.
  2. Ensure "Always ask you where to save files" option is selected from about:preferences
  3. Download a file from https://filesamples.com/formats/png

Expected Results
The "Save files as..." file picker should prompt the user on where to save the file.

Actual Results
The "What do you want Firefox to do with this file" dialog shows.

Severity: -- → S3
Priority: -- → P3

Do I understand correctly, that if person selects "Always ask you where to save files" option from about:preferences, only one dialog should be shown, "where to save this file"?
What about the behavior if user selects "Always ask" on a specific file, say, png files in Applications section in about:preferences. Which dialog should be shown? "What should firefox do with this file?" or "Where to save this file"? Or both?

Here is the table of current behavior:

Always ask you where to save files improvements_to_download_panel action unknown_content_dialog where to save file dialog
true true / false - shown shown if save is selected
false true - - -
false false - shown -
true true / false save - shown
false true / false save - -
true true / false always ask shown shown if save is selected
false true always ask - -
false false always ask shown -
true true / false open with shown shown if save is selected
false false open with shown -
false true open with - -

Could you also use this table to point out what should be different?

Flags: needinfo?(mtigley)

Do I understand correctly that we want changes in these 3 behaviors?

Always ask you where to save files improvements_to_download_panel action unknown_content_dialog where to save file dialog
true true - - shown
true true always ask - shown
true true open with - shown

(In reply to Ava Katushka from comment #3)

Do I understand correctly that we want changes in these 3 behaviors?

Always ask you where to save files improvements_to_download_panel action unknown_content_dialog where to save file dialog
true true - - shown
true true always ask - shown
true true open with - shown

I think the first and last one are correct here. I think that 'always ask' should probably show the unknown_content_dialog first, followed by the "where to save" dialog (which would now always come up, not only if the user picks "save to disk"). Does that help?

Flags: needinfo?(mtigley) → needinfo?(ava8katushka)

Also solves 1719902 - the default system action is changed from "opening with file" to saving.

Assignee: nobody → ava8katushka
Status: NEW → ASSIGNED

think that 'always ask' should probably show the unknown_content_dialog first, followed by the "where to save" dialog

That's the behavior right now.

As for "Launch with application" currently in code launch with application and save file to disk are two parallel actions which don't cross:
if/else -> https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsExternalHelperAppService.cpp#1958
comment -> https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsExternalHelperAppService.cpp#2557

And prompting "where to save" is a part of the path of saving to disk, but not launching with application. I think it goes along with assumption that files files which are about to be opened are saved in the temp directory.

Should we change it so we will ask about the save location if "ask where to save file" is set to true?

Flags: needinfo?(ava8katushka)
Flags: needinfo?(mtigley)

(In reply to Ava Katushka from comment #1)

Do I understand correctly, that if person selects "Always ask you where to save files" option from about:preferences, only one dialog should be shown, "where to save this file"?
What about the behavior if user selects "Always ask" on a specific file, say, png files in Applications section in about:preferences. Which dialog should be shown? "What should firefox do with this file?" or "Where to save this file"? Or both?

That's a good point. In general, we want to do away with showing the unknown content dialog and only show the filepicker dialog when "Always ask where to save files" is set.

It might be easier to think about the cases when we DO show the unknown content dialog(as you've outlined in the table above). Right now, I think there's one specific case where it makes sense to:

  • if the user has configured to have "Always ask you where to save files" set and has a specific file type set to "Always ask".

(In reply to Ava Katushka from comment #3)

Do I understand correctly that we want changes in these 3 behaviors?

Always ask you where to save files improvements_to_download_panel action unknown_content_dialog where to save file dialog
true true - - shown
true true always ask - shown
true true open with - shown

As you mentioned in Comment 6, the second row is already the existing behavior so I don't think we need to adjust anything for that (i.e: just show the unknown content dialog here)

For the first and third rows, yes we should show the "Save File as" dialog in both cases.

Flags: needinfo?(mtigley)
Blocks: 1719900
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/42314b388e89 Show "Save as dialog" instead of "Unknown Content" dialog. r=mtigley,Gijs,preferences-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Depends on: 1730891
See Also: → 1730891
No longer depends on: 1730891
Regressions: 1738601
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: