Skip to content

Open map of place where picture was taken #1360

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

Merged
merged 11 commits into from
May 7, 2018

Conversation

tanvidadu
Copy link
Contributor

Description

Fixes #1126

Added a Floating Button which open Google map app with street view showing the location specified by the coordinates.

Tests performed

Tested on API level 24 , Samung J7 max with betaDebug.

Screenshots showing what changed

map

@misaochan
Copy link
Member

Looks good to me, what do you think @neslihanturan ?

@neslihanturan
Copy link
Collaborator

I have tested this one, but I have two questions:
1- If this get merged, where we will put zoom button and vice versa:)
2- This should be disabled whenever location information isn't exist in photo

@tanvidadu
Copy link
Contributor Author

tanvidadu commented Apr 16, 2018

  1. when one of the pr either Zoom #1300 or Open map of place where picture was taken #1360 gets merged I will immediately submit another patch to convert them to nested FAB. (futuresimple/android-floating-action-button#22.)
  2. when coordinates are not present a toast saying "Coordinates were not specified during image selection" will be displayed to user

@misaochan
Copy link
Member

I think it might be better to hide the button entirely if coordinates are not present? :)

@tanvidadu
Copy link
Contributor Author

I think it will be more intuitive to hide the FAB button I will change the fix accordingly ! thanks :)

@tanvidadu
Copy link
Contributor Author

@misaochan @neslihanturan I have made the required changes ! thanks :)

@commons-app commons-app deleted a comment Apr 17, 2018
@commons-app commons-app deleted a comment Apr 17, 2018
@codecov-io
Copy link

codecov-io commented Apr 17, 2018

Codecov Report

Merging #1360 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1360      +/-   ##
=========================================
- Coverage    3.21%   3.19%   -0.02%     
=========================================
  Files         132     132              
  Lines        7091    7131      +40     
  Branches      682     687       +5     
=========================================
  Hits          228     228              
- Misses       6848    6888      +40     
  Partials       15      15
Impacted Files Coverage Δ
...java/fr/free/nrw/commons/upload/ShareActivity.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 693c37f...0c44da0. Read the comment docs.

@tanvidadu
Copy link
Contributor Author

I have added nested FAB in this pull request. Screenshots are below :

fab1
fab2

@misaochan
Copy link
Member

misaochan commented Apr 27, 2018

Looks good to me! 👍 Happy to merge if manual testing passes.

@neslihanturan
Copy link
Collaborator

@tanvidadu great job, I have a few more suggestions and we are done.

  • Can you please give an information messaje when there is no location information provided and user clicked to map icon?
  • Can we use a plus icon on fab, instead of arrow, similar to our new nearby look. And can we change FAB colors as in nearby FABs, to make our app consistent.

@misaochan
Copy link
Member

misaochan commented Apr 30, 2018

@neslihanturan , sorry, I personally think that the up arrow is more appropriate than a plus button. :) Because in Nearby the FAB is for uploading (i.e. "adding") something, whereas in this case it is just a view (zoom and coordinates).

Maybe if the up arrow isn't suitable, we can think of a 3rd option?

I agree re: displaying a toast if there is no location information. I'm also good with the FAB color change.

@neslihanturan
Copy link
Collaborator

You might be right @misaochan , but according to material design https://material.io/guidelines/components/buttons-floating-action-button.html#buttons-floating-action-button-floating-action-button , doesn't matter if you mean "add" or not, they use plus as example. So it feels more natural to me. I think meaning of plus is not "add", instead "expand". What do you think?

@tanvidadu
Copy link
Contributor Author

tanvidadu commented Apr 30, 2018

  • I forgot to un-comment a condition that allows the map option to be present only when coordinates are present, which will fix the first issue.
  • I found the up arrow more suitable but I am happy to change it after @misaochan opinion on it. I will add the FAB color change feature similar to nearby.

@misaochan
Copy link
Member

Ah, interesting! In that case yes, I'm good with changing it to a "+". :)

@nicolas-raoul
Copy link
Member

Sorry I am late to the discussion, but personally I also preferred the arrow haha
The guideline page actually has examples with something else than a +, it seems:

screenshot from 2018-05-01 11-37-04
screenshot from 2018-05-01 11-37-20

The Facebook Messenger app was using the "+" before, but they replaced it with the "text bubble" symbol above, I guess users were finding the "+" confusing:

screenshot_20180501-140756

@misaochan
Copy link
Member

Haha, poor Tanvi! How about we just leave the arrow for now and merge this PR after the color change and coordinate checks are implemented? We can always continue discussion and change it later if desired.

@tanvidadu
Copy link
Contributor Author

tanvidadu commented May 2, 2018

I will make the required changes 👍

@commons-app commons-app deleted a comment May 2, 2018
@commons-app commons-app deleted a comment May 2, 2018
@misaochan
Copy link
Member

@neslihanturan Shall we go ahead and merge?

@neslihanturan
Copy link
Collaborator

Great job @tanvidadu !

@neslihanturan neslihanturan merged commit 4f6b791 into commons-app:master May 7, 2018
maskaravivek pushed a commit that referenced this pull request May 18, 2018
* Intent to map added

*  Merge conflicts resolved

*  Added the functionality to hide FAB incase of null coordinate

*  Merge Conflict resolved

*  Improve pr quality

* Improve Quality

*  Added nested FAB animations

* Nested FAB implemented

*  Improve Quality

*  Added up arrow

*  Javadocs Added
misaochan pushed a commit that referenced this pull request May 31, 2018
…rby (#1495)

* Localisation updates from https://translatewiki.net.

* Integrate API for displaying featured images (#1456)

* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs

* Update pull_request_template.md (#1476)

* Update pull_request_template.md

* Remove Javadocs mention

* Added required/optional notes

* resolves #1464 : MediaDataExtractor is making inefficient (redundant) server calls (#1496)

* Open map of place where picture was taken (#1360)

* Intent to map added

*  Merge conflicts resolved

*  Added the functionality to hide FAB incase of null coordinate

*  Merge Conflict resolved

*  Improve pr quality

* Improve Quality

*  Added nested FAB animations

* Nested FAB implemented

*  Improve Quality

*  Added up arrow

*  Javadocs Added

* Add nearby tutorial (#1467)

* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style

* CONTRIBUTING: fix formatting of the gist of the guidelines (#1453)

* CONTRIBUTING: fix formatting of the gist of the guidelines

First level headings for a gist seems to be overkill.

So, replace first level headings with an ordered-list which
sounds more meaningful.

* CONTRIBUTING: specify clearly that 'blame' is a feature of "Git"

The contributing file specifies about the ability to know who wrote
something without the need of @author javadoc tags but incorrectly
attributes the feature to GitHub.

Correctly attribute the feature to where it belongs, Git, and specify
the name of the feature to help users easily take advantage of it.

* Feature/switch to butterknife (#1494)

* Implemented butterknife in MediaDetailFragment [issue #1491]

* Implemented butterknife in MediaDetailPagerFragment [[issue #1491]]

* post merge upstream master wip [[issue #1491]]

* Localisation updates from https://translatewiki.net.

* Bug fix #1504 (#1506)

* Bug fix #1504

* Filtered messages with ConnectException [issue #1504]

* A generalised message for exceptions in Nearby Activity [issue #1504]

* Localisation updates from https://translatewiki.net.

* Fix security exception crash while accessing network location provider (#1498)

* Fix security exception crash while accessing network location provider

* Added java docs

* Localisation updates from https://translatewiki.net.

* Log P18 edits to wikidata corresponding wikidata entity on uploading a nearby image

* Added java docs

* Fix test build

* Refresh nearby

* Refresh nearby list on successful edit

* Java docs

* Make authenticated wikidata edits

* Updated toast message to show entity name that was edited
@tanvidadu tanvidadu deleted the map branch August 3, 2018 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants