Add a new property to the download object, to be passed from WebExtensions and checked when automatically opening the downloads panel
Categories
(Firefox :: Downloads Panel, task, P2)
Tracking
()
People
(Reporter: aminomancer, Assigned: aminomancer)
References
Details
(Whiteboard: [fidefe-2022-downloads-followup])
Attachments
(1 file)
This is the downloads internal half of the proposed changes for Bug 1759231. Add a boolean property to the download object prototype that will be checked before automatically opening the downloads panel in response to a download starting. I think dontOpenPanel is the clearest name for the property, since most of the time, the panel will open (see bug 1759231 comment 15 for rationale).
On the Downloads UI end, we need to check the download's property here in onDownloadChanged, but I think we need to also expand _notifyDownloadEvent to add an additional parameter. That's because (I think) we may want downloads started without user input to still dispatch a notification for the indicator animation and attention state. Otherwise there's no way for the user to know a download started.
So that means this property only affects whether the panel is shown. The animation will still play, and attention state still change, even without user input. I think that makes the most sense, because the alternative would mean there's no indication at all that a download began. That may be good for some situations, like the Simple Tab Groups problem in bug 1689929. But that means it's only good when an extension basically uses the downloads system for its own background operations. It's never helpful if the download is something the user would actually care about, especially if the download is big/slow. The user would not be notified that a download began and then they might quit Firefox while it's still downloading, not knowing that a download is in progress. So I think bug 1689929 needs to be resolved by other means.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
Add a property dontShowPanel to the download object prototype. It is
false by default. When passed a true value, it will prevent the usual
behavior of opening the downloads panel when the download starts. This
will allow some (forthcoming) internal code in the WebExtensions API to
prevent showing the downloads panel when a download is created without
any user input (see bug 1759231 for details).
Comment 2•4 years ago
|
||
Thanks for working on this Shane!
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•