Skip to content

Conversation

@anandaroop
Copy link
Member

@anandaroop anandaroop commented Jun 13, 2025

Description

Co-authored-by: @MounirDhahri

To accompany the enablement of cross-platform City Guide (#12175) here we also expand the list of cities from the original six that were supported at launch.

Which cities to include? Luckily we already have a concept of "featured cities" which we make use of in various places e.g. on https://www.artsy.net/shows

So here we create an expanded list of cities based on that existing concept.

For QA purposes, this is behind a feature flag: Enable expanded city list in City Guide

iOS Android
expanded.out.mov
android-expanded.out.mov

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos at least on Android, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

  • Expanded list of City Guide cities behind feature flag

Need help with something? Have a look at our docs, or get in touch with us.

@anandaroop anandaroop self-assigned this Jun 13, 2025
@anandaroop anandaroop added the FF label Jun 13, 2025
@anandaroop anandaroop requested review from a team and MounirDhahri June 13, 2025 18:30
MounirDhahri
MounirDhahri previously approved these changes Jun 13, 2025
Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

Yesss

Copy link
Member Author

@anandaroop anandaroop Jun 13, 2025

Choose a reason for hiding this comment

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

This file is added directly to Eigen in this PR, but note that we currently have a build process that grabs this from Metaphysics.

I'm not exactly sure why — perhaps we anticipated this list would evolve more frequently, but it has been unchanged since City Guide's launch in early 2019 😅

We should decide whether to continue with that pattern, or do away with that kinda superfluous build step and leave this static data file here in Eigen.

const insets = useSafeAreaInsets()
const enabledExpandedList = useFeatureFlag("AREnableExpandedCityGuide")

const cities = enabledExpandedList ? expandedCities : originalCities
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only place we switch between the regular and expanded list, on order to create the expanded city picker menu.

But note that there are several other mentions of this static data file, and we haven't combed through these to see if they also need to change according to this flag.

Comment on lines +171 to +174
"maxBounds": {
"sw": { "lat": 44.959, "lng": -74.338 },
"ne": { "lat": 46.036, "lng": -72.802 }
}
Copy link
Member Author

@anandaroop anandaroop Jun 13, 2025

Choose a reason for hiding this comment

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

I could have sworn that these maxBounds parameters were in use before, and governed the behavior of the map in Eigen.

But that does not appear to be the case now. (I'm really not sure what happened here, it's possible that it changed or that I mis-remembered the original feature.)

In any case I generated them for completeness' sake, based on this notebook which dates back to the original City Guide days.

@anandaroop anandaroop requested a review from a team June 13, 2025 19:51
@anandaroop anandaroop force-pushed the anandaroop-MounirDhahri/expanded-city-guide branch from 19cbe84 to 1525c80 Compare June 27, 2025 15:55
<MapboxGL.Camera
ref={cameraRef}
animationMode="flyTo"
animationMode="moveTo"
Copy link
Member Author

@anandaroop anandaroop Jun 27, 2025

Choose a reason for hiding this comment

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

This change is meant to replace the very melodramatic current animation with a simple instant transition.

The old animation however, due to being so lengthy, was actually masking the query latency. Now we see a spinner instead, but we'll try to improve upon that too.

Before After
animationMode="flyTo" animationMode="moveTo"
fly_half.mp4
move_half.mp4

@MounirDhahri MounirDhahri force-pushed the anandaroop-MounirDhahri/expanded-city-guide branch from 1525c80 to 1392e34 Compare September 19, 2025 14:06
@artsy-peril
Copy link
Contributor

artsy-peril bot commented Sep 19, 2025

Warnings
⚠️

Changes were made to package.json, but not to yarn.lock.
Perhaps you need to run yarn install?

Generated by 🚫 dangerJS against 1302eef

cursor[bot]

This comment was marked as outdated.

MounirDhahri and others added 2 commits September 19, 2025 16:29
Turns out these are not actually consulted by Eigen,
we use the data coming from upstream in MP instead.
I make this change just for consistency
"slug": "tokyo-japan",
"name": "Tokyo",
"coordinates": { "lat": 35.69, "lng": 139.69 },
"coordinates": { "lat": 35.68, "lng": 139.76 },
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 chose the updated values for Tokyo and Dubai manually by adapting this notebook from the old City Guide days https://observablehq.com/@anandaroop/city-guide-shows

Copy link
Member

Choose a reason for hiding this comment

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

Impressive notebook! thanks

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's Tokyo before and after, much improved.

Before After
tokyo tokyo2

Dubai didn't change, I'd have to look into why, but it wasn't as bad as Tokyo. Imo it's not a blocker, but I will investigate.

Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

LGTM

@MounirDhahri
Copy link
Member

FYI, I looked further into the scripts we currently have but are not using to understand if they are worth keeping. I believe we don't need them anymore. The goal, I assume, was to preheat the relay cache so more cities are available for quicker switching as well as sending less payload to MP (using query id instead of the entire query payload). Although it's a nice quality of life improvement, I think it could mean that one might get cached values and we would need to maintain a script that is very hard to know about its existence (which is the case now). Which is why I think it's fair to remove it

@anandaroop
Copy link
Member Author

One final thought I have before opening this up for QA — now that we've got a bigger list of cities in the picker UI, it's no longer easy to digest in one glance.

Therefore I think the ordering of the list is important. Currently it's essentially in random order:

before

(Not really random, it follows this list in Gravity, but I do not know why that list is ordered the way it is, and neither will any user.)

Since we have full control in Eigen thanks to that static file that lives in this repo, we can modify the ordering to make it more sensible.

There's more than one way to do this. I propose keeping the "original 6" cities at the top of the list, followed by the remainder in alphabetical order:

after

Not perfect, but an improvement over the current list I think, a compromise between keeping the original 6 major cities where they always were vs making the other cities easy to find by skimming.

@MounirDhahri if you agree, I will push that change up to this branch.

@MounirDhahri
Copy link
Member

@anandaroop I think that's a valid concern and I like the suggested solution.

My only worry is that if you didn't see your city at first glance from the top 6 in the List (London for example), you might not find it after you scroll down to the letter L. I suggest maybe to also include top cities along with the full list of cities below and make the separation clear. Something like this
Screenshot 2025-09-24 at 07 48 05

@MounirDhahri
Copy link
Member

Another alternative would be a search bar but I like your suggestion more
Screenshot 2025-09-24 at 07 50 11

@anandaroop
Copy link
Member Author

I was going for the lazy approach that merely tweaked the data file, but yeah I'm open to any of that! Either now, or as a a follow-up. We could get design input as well. Maybe a hands-on QA session could surface ideas about the best way forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants