Skip to content

[NMA-1036 In progress] Explore Dash physical search results - #804

Merged
HashEngineering merged 35 commits into
explore-dashfrom
feature-explore-physical
Nov 9, 2021
Merged

HashEngineering merged 35 commits into
explore-dashfrom
feature-explore-physical

Conversation

@Syn-McJ

@Syn-McJ Syn-McJ commented Nov 7, 2021

Copy link
Copy Markdown
Member

This PR unblocks map-related stories for the explore-dash (specifically NMA-785)

Issue being fixed or feature implemented

  • Redesign of the existing search results functionality
  • Search radius picker
  • Filtering by screen bounds or screen center + radius
  • Some refactoring

Changes related to the map:

  • Moved map-related code into a separate fragment
  • Decoupled location tracking and permission requests from the map
  • Minor fixes for values and icon sizes

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

Syn-McJ and others added 30 commits October 22, 2021 11:16
Replaced callback based approach in the sync worker with more object oriented one
fix: the issue with BaseDao.clear() method
@Syn-McJ Syn-McJ self-assigned this Nov 7, 2021

defaultConfig {
minSdkVersion 19
minSdkVersion 23

@HashEngineering HashEngineering Nov 7, 2021 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

excellent. This branch was left out of my Andriod 6 minimum PR's.

Comment on lines +60 to +61
const val METERS_IN_MILE = 1609.344
const val METERS_IN_KILOMETER = 1000.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

so internally distances will be in meters? And the user will be seeing km or miles?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, internally we should keep everything in metric because it's used in most of map and location APIs. The switch should only happen on the higher level (the ViewModel) to avoid doing conversions all over the place. Right now switching isn't implemented yet and the user sees miles.

Comment on lines +120 to +124
if (results.isNotEmpty()) {
// if (results.size < 20) {
setMarkers(results)
// } else setMarkers(results.shuffled().subList(0, 20))
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this displaying all markers for thousands of stores, or is results already filtered in some way to limit the number.

@Syn-McJ Syn-McJ Nov 8, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The results are limited by min(screen bounds, chosen radius). It still means there can be a couple of thousand points shown in big cities when you zoom out. I have left a suggestion to limit this further in NMA-785.

false
} else {
// TODO: this can be moved to the viewModel, which will allow to write a test for it.
// Also, it might be better to set Id or Tag of the marker to the Id

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with using tags to handle clicks on markers

@ClaudeHangui ClaudeHangui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good for me

.asBitmap()
.load(it.logoLocation)
.placeholder(R.drawable.ic_merchant)
.error(R.drawable.ic_merchant) // TODO: do we need this here given that placeholder is set below? It's a bit confusing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given that the placeholder and error drawables are the same, I agree, we don't need to duplicated this

@HashEngineering
HashEngineering merged commit bdda5e0 into explore-dash Nov 9, 2021
@Syn-McJ
Syn-McJ deleted the feature-explore-physical branch November 10, 2021 04:52
@Syn-McJ
Syn-McJ restored the feature-explore-physical branch November 10, 2021 04:52
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