Skip to content

Showing an overlay dialog when a nearby item is tapped #569

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 1 commit into from
May 14, 2017

Conversation

maskaravivek
Copy link
Member

@maskaravivek maskaravivek commented May 14, 2017

Attached screenshots.

List View

nearby_list_view

Map View

nearby_map_view

String query = WIKIDATA_QUERY_TEMPLATE.replace("${RADIUS}", "" + radius)

String query = FileUtils.readFromFile(context, "queries/nearby_query.txt");

Copy link
Collaborator

@whym whym May 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this way the file will be loaded every time a query is sent. Can the file be read only once and stored somewhere?

I would suggest moving readFromFile() to getInstance() and storing the query in an instance field.

EDIT: We would also have to avoid calling getInstance() for every query, too...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maskaravivek are you working on this? If not, may I? (actually I have gone half way for that.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am currently not working on it. It would be great if you could complete the thing and create a PR.

@whym
Copy link
Collaborator

whym commented May 14, 2017

After pressing "read article" I was sent to the Wikidata page on the class (e.g. "museum"), not the instance (e.g. https://www.wikidata.org/wiki/Q10856362). Is this intended?

Great work, by the way!

@misaochan
Copy link
Member

misaochan commented May 14, 2017

Yeah, the class seems to have more information than the instance, don't you think?

@misaochan
Copy link
Member

Will merge anyway, @maskaravivek says they will fix it the file loading in next patch.

@misaochan misaochan merged commit e651aca into commons-app:master May 14, 2017
@nicolas-raoul
Copy link
Member

@misaochan I believe @whym understands that Wikidata gets open, but wonders why the "museum" page gets opened rather than the page of the item itself "Daimyo Clock Museum".

@nicolas-raoul
Copy link
Member

Created #588 to address the bug @whym pointed out.

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.

4 participants