Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Support Downloads #36

Open
arshubham opened this issue Jan 11, 2019 · 14 comments · May be fixed by #201
Open

Support Downloads #36

arshubham opened this issue Jan 11, 2019 · 14 comments · May be fixed by #201
Labels
Confirmed Verified by someone other than the reporter Help Wanted Extra attention is needed
Milestone

Comments

@arshubham
Copy link

No description provided.

@cassidyjames cassidyjames added the Confirmed Verified by someone other than the reporter label Jan 11, 2019
@cassidyjames cassidyjames added the Help Wanted Extra attention is needed label Jan 29, 2019
@cassidyjames cassidyjames pinned this issue Apr 9, 2019
@alcinnz
Copy link

alcinnz commented Oct 14, 2019

I can point you to Odysseus's code for this, but first I want to ask: What UX do you want here?

I might even implement it, but I want to be your design not mine.

@cassidyjames
Copy link
Owner

@alcinnz I think something close to Firefox/Epiphany would make sense as a start. I haven't decided how I want the empty/no-downloads state to work, whether the button is completely hidden (like Firefox/Epiphany), or whether I want to make it insensitive (more elementary-like).

@cassidyjames
Copy link
Owner

I think I might also want to explore a toast with an "Open" button on it when the download is complete; I think that's something Firefox Focus on Android does, and I like that it makes it super quick to perform the likely action.

@cassidyjames
Copy link
Owner

@alcinnz I'm working on a prototype branch now and will push that for the UI direction. 😄

@alcinnz
Copy link

alcinnz commented Oct 15, 2019

Hmmm, that (optionally combined with a confirmation dialog like you have external links) should be more straightforward than what I've done in Odysseus. My aversion to popups lead me to fight WebKit a little bit.

You should watch out for application/octet-stream MIMEtypes, that means the client should be guessing the real MIMEtype. Otherwise they can be passed straight to GIO for handling. https://github.com/alcinnz/Odysseus/blob/master/src/Models/Download.vala#L188

And you'll need to instruct WebKit to download pages it can't display, that behavior doesn't come out of the box. https://github.com/alcinnz/Odysseus/blob/master/src/Traits/navigate/autodownload.vala#L27

@alcinnz
Copy link

alcinnz commented Oct 15, 2019

I'll try implementing this myself.

@cassidyjames
Copy link
Owner

cassidyjames commented Oct 15, 2019

@alcinnz rather than a dialog, I think I'd prefer a Granite.Widgets.Toast so it's self-contained within the WebView. I am already using a toast for undoing setting a site as a favorite, for example.

@alcinnz
Copy link

alcinnz commented Oct 16, 2019

I've almost got it working! Though I'm struggling with implementing the "show in folder button", any tips?

@cassidyjames
Copy link
Owner

cassidyjames commented Oct 16, 2019

@alcinnz that could be dropped to start, but I think Torrential does it here: https://github.com/davidmhewitt/torrential/blob/49ee0d870dc53e45b7638ecd00d6a60378d10b69/src/TorrentManager.vala#L304

@alcinnz alcinnz linked a pull request Oct 18, 2019 that will close this issue
@cassidyjames cassidyjames added this to the 7.0 milestone Oct 18, 2019
@4jNsY6fCVqZv
Copy link

4jNsY6fCVqZv commented Oct 26, 2019

When I think of a download feature related to Ephemeral as a private-by-default, always-incognito browser, I ask myself the following questions:
How can safe downloads be realized with Ephemeral and how can users be informed about the risks of downloads and at the same time learn how safe ways of dealing with downloads could look like?

That's what the Tor browser does:
Files that the browser can display directly, such as PDFs, are displayed inside the browser. For all downloadable files, the following pop-up window appears:

Screenshot

@janxkoci
Copy link

janxkoci commented Mar 7, 2020

I dislike the idea of a dialog, just to inform a user about something.

How can safe downloads be realized with Ephemeral and how can users be informed about the risks of downloads and at the same time learn how safe ways of dealing with downloads could look like?

Instead, I think it would be better to add this information into the text of new Ephemeral window. I believe Chrome also mentiones downloaded files in it's private windows, so it's not a weird place.

@cassidyjames
Copy link
Owner

cassidyjames commented Mar 10, 2020

@janxkoci a potential compromise could be copy on the welcome screen plus an in-app toast (like I have for removing a favorite) for confirming downloads. It could be short and sweet, like,

x “example.com” is trying to download “filename.foo” Download

@janxkoci
Copy link

@cassidyjames yeah the thing is I still don't know what is a toast 😃 How do I see it? I tried adding a page to favs and then removing it, but didn't see anything special...

@cassidyjames
Copy link
Owner

@janxkoci ah, hit Ctrl+D to remove a favorite; I only throw it on keyboard (in case it was an accidental shortcut press).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Confirmed Verified by someone other than the reporter Help Wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants