-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lightbox: Add download button to bottom app bar #1144
base: main
Are you sure you want to change the base?
Conversation
ab03207
to
fb8bab9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments below from a quick skim. Please also update your commit message to follow our Git style. The part after lightbox:
should start with a capital; also add an empty line and then Fixes:
with the issue fixed in the commit.
@chrisbobbe I've made the changes as mentioned, Please take a look when you have time, Thank you. |
See also the chat thread I started for sorting out the available APIs here: I'd like to hear there much the same information I asked for at #1144 (comment) above — that'd help us compare this API to alternatives and work out what solution we want. |
3ce76de
to
ad1c17f
Compare
@gnprice I've worked on the reviews you've given,
Please take a look when you have time. Thank you |
Thanks! On a high-level scan, this structure looks good. The use of a new file The main thing this will need is tests. In this version, the test case checks that a snack bar gets shown, but not any part of the actual functionality of the button. There's significant logic in that To do that, the main ingredient you'll need is to call the host For examples using Pigeon, see our notifications tests. For a simpler example though not using Pigeon, try looking at ZulipBinding.pickFiles, and the place where that's called, and the test in test/widgets/compose_box_test.dart that tests the place where pickFiles is called. You might also need to add a ZulipBinding method for getExternalStorageDirectory, which should be a fairly simple binding method to add. |
9be35a5
to
08b6583
Compare
Modified the download implementation to use the @gnprice , could you please review it? |
Thanks @chimnayajith for all your work on this! I like this idea of using DownloadManager — I think that's likely to be the right strategy for us to use. The structure of this code looks broadly good, though I haven't reviewed it in detail. This issue is for the M6 Post-launch milestone, though, and I've determined we need to start focusing more strictly on launch issues in order to get the app launched to our users on schedule. And there's still significant work ahead to get this completed, partly because there's always an extra level of care and validation required when dealing with platform APIs. Given that, let's put this PR on hold for now. We can plan for you to pick this issue up from here when we're ready to resume work on post-launch issues. |
Pull Request
Description
This merge request introduces a new Download Image button to the bottom app bar, enabling users to download images.
When tapped, the button initiates a network request to download the image and saves it to the device's storage using the
DownloadManager
API which is implemented using pigeon.Related Issues
Screenshots
Additional Notes