MushroomObserver / mushroom-observer-mobile

Mushroom Observer's mobile application
5 stars 2 forks source link

Location search should be sorted #19

Closed JoeCohen closed 2 years ago

JoeCohen commented 2 years ago

This would make it easier for a user to select the best Location when the user's desired Location does not exist. Ex:

Question for @pellaea or @oliviacpu: In what order are they provided by the webserver script? Maybe that's the right place to handle this?

pellaea commented 2 years ago

Are you talking about auto-complete, or the location search function, Joe?

On Wed, Feb 2, 2022 at 12:32 PM Joseph D. Cohen @.***> wrote:

This would make it easier for a user to select the best Location when the user's desired Location does not exist. Ex:

  • I wanted to use a Location that doesn't yet exist, Chehalem Ridge Nature Park.
  • I know it's in Washington County Oregon
  • I type `Washington Co., Or". (That's sufficient to limit the results to the region Washington Co., Oregon, USA.) Desired result: Hits are displayed in alpha order Actual result: They are not in alpha order. (I can't tell how they are ordered.)

Question for @pellaea https://github.com/pellaea or @oliviacpu https://github.com/oliviacpu: In what order are they provided by the webserver script? Maybe that's the right place to handle this?

— Reply to this email directly, view it on GitHub https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTNNLIWESLTXZWMUYDBP3UZFTBBANCNFSM5NMVWIFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

JoeCohen commented 2 years ago

I'm not sure about the official name. It's what I see in the mobile app when I view the Location page, then type in the "Search" window. (Or even before typing anything there.)

On Wed, Feb 2, 2022 at 9:55 AM Jason Hollinger @.***> wrote:

Are you talking about auto-complete, or the location search function, Joe?

On Wed, Feb 2, 2022 at 12:32 PM Joseph D. Cohen @.***> wrote:

This would make it easier for a user to select the best Location when the user's desired Location does not exist. Ex:

  • I wanted to use a Location that doesn't yet exist, Chehalem Ridge Nature Park.
  • I know it's in Washington County Oregon
  • I type `Washington Co., Or". (That's sufficient to limit the results to the region Washington Co., Oregon, USA.) Desired result: Hits are displayed in alpha order Actual result: They are not in alpha order. (I can't tell how they are ordered.)

Question for @pellaea https://github.com/pellaea or @oliviacpu https://github.com/oliviacpu: In what order are they provided by the webserver script? Maybe that's the right place to handle this?

— Reply to this email directly, view it on GitHub <https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAYTNNLIWESLTXZWMUYDBP3UZFTBBANCNFSM5NMVWIFA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19#issuecomment-1028203233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALDFHAAU62HZ6LV7C6LJLUZFV2LANCNFSM5NMVWIFA . You are receiving this because you authored the thread.Message ID: @.*** com>

pellaea commented 2 years ago

Oh, sorry! I didn't notice this was a question about the mobile app! :)

On Wed, Feb 2, 2022 at 1:01 PM Joseph D. Cohen @.***> wrote:

I'm not sure about the official name. It's what I see in the mobile app when I view the Location page, then type in the "Search" window. (Or even before typing anything there.)

On Wed, Feb 2, 2022 at 9:55 AM Jason Hollinger @.***> wrote:

Are you talking about auto-complete, or the location search function, Joe?

On Wed, Feb 2, 2022 at 12:32 PM Joseph D. Cohen @.***> wrote:

This would make it easier for a user to select the best Location when the user's desired Location does not exist. Ex:

  • I wanted to use a Location that doesn't yet exist, Chehalem Ridge Nature Park.
  • I know it's in Washington County Oregon
  • I type `Washington Co., Or". (That's sufficient to limit the results to the region Washington Co., Oregon, USA.) Desired result: Hits are displayed in alpha order Actual result: They are not in alpha order. (I can't tell how they are ordered.)

Question for @pellaea https://github.com/pellaea or @oliviacpu https://github.com/oliviacpu: In what order are they provided by the webserver script? Maybe that's the right place to handle this?

— Reply to this email directly, view it on GitHub < https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AAYTNNLIWESLTXZWMUYDBP3UZFTBBANCNFSM5NMVWIFA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19#issuecomment-1028203233 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAALDFHAAU62HZ6LV7C6LJLUZFV2LANCNFSM5NMVWIFA

. You are receiving this because you authored the thread.Message ID: @.*** com>

— Reply to this email directly, view it on GitHub https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19#issuecomment-1028208184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTNNNXULNFXC7PT2E4VQLUZFWQXANCNFSM5NMVWIFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.*** com>

JoeCohen commented 2 years ago

Initial Location page IMG_2180 Location page after typing "washington co or" IMG_2178

oliviacpu commented 2 years ago

I think I can sort the filtered matches alphabetically from the start of the location name. I'll do that to start.

Sorting the entire list is challenging because we don't really have the actual address components. Trying to parse them ends up with some funky results.

[
  {
    id: 214,
    name: 'North Carolina, USA',
    prefix: 'N',
    street: 'Carolina'
  },
  {
    id: 53,
    name: 'Asheville, Buncombe Co., North Carolina, USA',
    street: 'Asheville',
    city: 'Buncombe',
    state: 'Co'
  },
  {
    id: 60,
    name: 'Gray Whale Ranch, Santa Cruz Co., California, USA',
    street: 'Gray Whale',
    type: 'Rnch',
    city: 'Santa Cruz',
    state: 'Co'
  },
  {
    id: 5,
    name: 'Gualala, Mendocino Co., California, USA',
    street: 'Gualala',
    city: 'Mendocino',
    state: 'Co'
  },
  {
    id: 36,
    name: 'Ortega Highway, Cleveland National Forest, California, USA',
    street: 'Ortega',
    type: 'Hwy',
    city: 'Cleveland National Forest',
    state: 'CA'
  },
  {
    id: 58,
    name: 'Santa Cruz, Santa Cruz Co., California, USA',
    street: 'Santa'
  },
  {
    id: 39,
    name: 'Wilder Ridge, Humboldt Co., California, USA',
    street: 'Wilder',
    type: 'Rdg',
    city: 'Humboldt',
    state: 'Co'
  },
  {
    id: 69,
    name: 'Crescenta Valley Community Regional Park, La Crescenta, California, USA',
    street: 'Crescenta Valley Community Regional',
    type: 'Park',
    city: 'La Crescenta',
    state: 'CA'
  },
  {
    id: 38,
    name: 'Chumash Interpretive Center, Thousand Oaks, Ventura Co., California, USA',
    street: 'Chumash Interpretive',
    type: 'Ctr'
  },
  {
    id: 4186,
    name: 'Jackson Demonstration State Forest, Mendocino Co., California, USA',
    street: 'Jackson Demonstration State',
    type: 'Frst',
    city: 'Mendocino',
    state: 'Co'
  }
]
pellaea commented 2 years ago

Woah! Where are the extra fields coming from? That's so cool... and sometimes random... :)

On Fri, Feb 4, 2022 at 2:52 PM Olivia Computer @.***> wrote:

I think I can sort the filtered matches alphabetically from the start of the location name. I'll do that to start.

Sorting the entire list is challenging because we don't really have the actual address components. Trying to parse them ends up with some funky results.

[ { id: 214, name: 'North Carolina, USA', prefix: 'N', street: 'Carolina' }, { id: 53, name: 'Asheville, Buncombe Co., North Carolina, USA', street: 'Asheville', city: 'Buncombe', state: 'Co' }, { id: 60, name: 'Gray Whale Ranch, Santa Cruz Co., California, USA', street: 'Gray Whale', type: 'Rnch', city: 'Santa Cruz', state: 'Co' }, { id: 5, name: 'Gualala, Mendocino Co., California, USA', street: 'Gualala', city: 'Mendocino', state: 'Co' }, { id: 36, name: 'Ortega Highway, Cleveland National Forest, California, USA', street: 'Ortega', type: 'Hwy', city: 'Cleveland National Forest', state: 'CA' }, { id: 58, name: 'Santa Cruz, Santa Cruz Co., California, USA', street: 'Santa' }, { id: 39, name: 'Wilder Ridge, Humboldt Co., California, USA', street: 'Wilder', type: 'Rdg', city: 'Humboldt', state: 'Co' }, { id: 69, name: 'Crescenta Valley Community Regional Park, La Crescenta, California, USA', street: 'Crescenta Valley Community Regional', type: 'Park', city: 'La Crescenta', state: 'CA' }, { id: 38, name: 'Chumash Interpretive Center, Thousand Oaks, Ventura Co., California, USA', street: 'Chumash Interpretive', type: 'Ctr' }, { id: 4186, name: 'Jackson Demonstration State Forest, Mendocino Co., California, USA', street: 'Jackson Demonstration State', type: 'Frst', city: 'Mendocino', state: 'Co' } ]

— Reply to this email directly, view it on GitHub https://github.com/MushroomObserver/mushroom-observer-mobile/issues/19#issuecomment-1030301796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTNNJRFL3ETLFBLIEULKDUZQVADANCNFSM5NMVWIFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.*** com>

oliviacpu commented 2 years ago

@pellaea They came from a script I ran to test an address parsing library! ID and name are the only things the endpoint returns.

JoeCohen commented 2 years ago

That's funny! Made my day. An alpha sort based on name would be great. (And it's also the way the web site works. I thank, but can't double check right now because the site is so sloooooow.)