-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix #5246: map icon in Upload Wizard indicating if location is included in the EXIF data #5343
Fix #5246: map icon in Upload Wizard indicating if location is included in the EXIF data #5343
Conversation
The existing map icon may not be intuitive enough to indicate whether the location EXIF data will be included The two new XML map icons are intended to indicate the status of location sharing with the location data in the Upload Wizard
If an image is capture with the in-app camera, the location in the image metadata by default If so, the map icon in the Upload Wizard should be labelled with a green tick during initialisation of its UploadMediaDetailFragment instance
If the user selects images from the device storage to upload, the location EXIF data might originally not be included The map icon is labelled with a red question mark After pin-pointing the location manully, the map icon should be labelled with a green tick instead
Would you mind posting fullscreen screenshots of the whole activity, in both dark mode and light mode? |
SVG path is invalid, resulting in failure to render the icons Also imports are required for UploadMediaDetailFragment to use Drawable objects and R objects
When an image is chosen from the album to the Upload Wizard, its EXIF might contain location data. hasLocation() and fix of init() in UploadMediaDetailFragment ensures that the map icon is shown correctly
Is this still a draft, or ready for merging? |
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.
I tested, it works great!
Asking for just a few minor changes then this can be merged, I think.
app/src/main/java/fr/free/nrw/commons/filepicker/UploadableFile.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/upload/mediaDetails/UploadMediaDetailFragment.java
Outdated
Show resolved
Hide resolved
Ready for review now.
Surely I can do the refinement 👍🏼 |
Fix the comment about red and green labels for the map icon
Instead of using printStackTrace(), error directed to logcat
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.
Please use this as an example for logging:
apps-android-commons/app/src/main/java/fr/free/nrw/commons/upload/ImageProcessingService.java
Line 52 in f130851
Timber.d("Current image quality is %d", currentImageQuality); |
Clean up the catch clause in hasLocation() and getDataTimeFromExif()
Resolved. |
Description (required)
Regarding issue #5246, the idea is to have variants of the map icon (that enables the user to manually add the location for the image EXIF) in the Upload Wizard.
Similar to the suggestion in the issue's discussion thread, my idea is to have the map icon labelled with a red question mark if the location is not to be uploaded. On the other hand, if the location is included in the EXIF, the map icon is labelled with a green tick. See the icons below.
I used Inkscape to modify the SVG path data and transformed it back to the Android XML format. Just wonder if there are any more intuitive and clear icons than the currently proposed ones. If so, we can create and test them in the app.
In terms of the change in the map icon, I reckon that the location is included by default if the image is taken by the in-app camera. That's why there is concern that users may unintentionally share their location as mentioned in the issue thread. For this, we use
inAppPictureLocation
to determine which icon to display.Another situation is when the user manually pinpoints a location. The map icon is then labelled with a green tick.
I'd be happy to have insights for:
If the location removal feature in #5262 is available, then I guess this shall also be extended (i.e. changing the green tick back to a red question mark).
Tests performed (required)
To be completed after confirming details.
Screenshots (for UI changes only)