Closed Bug 2002273 Opened 6 months ago Closed 2 months ago

Download file dialog: allow to rename and change location

Categories

(Firefox for Android :: Downloads, enhancement)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: titouan, Assigned: giorga)

References

(Depends on 1 open bug)

Details

(Whiteboard: [fxdroid][group4])

Attachments

(1 file)

When the user starts a download, we currently have a dialog that asks them if they want to download the file.

This dialog should be replaced with a new one (Figma here), and placed behind a feature flag.

The dialog shows:

  • the size of the file to download
  • a field with the default file name (that doesn't get focus when the dialog opens)
  • a text view showing the path. It's preloaded with the default download path (that can be selected from the Settings, after Bug 1812815 is implemented)
  • Cancel and Download buttons.

When clicking the path, it should open the Location Picker (Figma), similar to what should be implemented in Bug 1812815.
The selected location only impacts the current download, and shouldn't be persisted.

When clicking the filename field, the focus should first go to the filename (excluding the extension).
The user can only rename the part before the extension.

The Download button should be disabled if:

  • filename is empty
  • file "full path" (path + filename) is too long

If the full path is too long (meaning the Android system wouldn't accept to write the file), then an error message should be shown below the path text (Figma here)

No longer blocks: downloads-rename
Assignee: nobody → giorga
Status: NEW → ASSIGNED
Blocks: 2021882

I removed the check and the error message for the file path length. Because we don't know for sure the number of the file path length that the Android system supports.
I checked with the Pixel 7, and it was 5000, but I'm not sure this case applies to all the phones.
And we have a mechanism: when we are saving the file, if it fails in the custom download folder, we are saving the file in the default download folder.

I removed the check and the error message for the file path length. Because we don't know for sure the number of the file path length that the Android system supports.
I checked with the Pixel 7, and it was 5000, but I'm not sure this case applies to all the phones.
And we have a mechanism: when we are saving the file, if it fails in the custom download folder, we are saving the file in the default download folder.

Pushed by giorga@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7732232ac4fb https://hg.mozilla.org/integration/autoland/rev/816dbbe9d532 Download file dialog: allow to rename and change location r=android-reviewers,android-l10n-reviewers,delphine,tthibaud,aaronmt
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Regressions: 2042018
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: