Skip to content
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

Events: Add geolocated events to Events landing page #1160

Open
iandunn opened this issue Dec 8, 2023 · 16 comments · May be fixed by #1183
Open

Events: Add geolocated events to Events landing page #1160

iandunn opened this issue Dec 8, 2023 · 16 comments · May be fixed by #1183

Comments

@iandunn
Copy link
Member

iandunn commented Dec 8, 2023

Showing the visitor events near them would be more useful than a list of all events in the world. We could reuse a lot of the code in the Events Widget in Core, but it'd be faster to query the wporg_events table directly, rather than making an API request. Bypassing the API might mean forking a lot of that code, though, so we should test out which approach is better.

We may need to add some extra caching around geolocation/results, since the number of visitors will be much higher than what the Events Widget is designed for. There won't be many cache hits based on IP address, since those will mostly be unique.

We need to work out the details of how it should function and look. We may want to include a way for the visitor to set their location, just like the Events Widget does.

@iandunn iandunn mentioned this issue Dec 8, 2023
14 tasks
@StevenDufresne StevenDufresne changed the title Add geolocated events to Events landing page Events: Add geolocated events to Events landing page Dec 11, 2023
@StevenDufresne
Copy link
Contributor

Agreed. Here's what I see today:

Screenshot 2023-12-11 at 8 37 07 AM

@StevenDufresne StevenDufresne added this to the Events: Promotion milestone Dec 11, 2023
@renintw
Copy link
Contributor

renintw commented Dec 11, 2023

Does converting IPs to regions and using them for caching work here? (to increase the cache hit rate)

@iandunn
Copy link
Member Author

iandunn commented Dec 12, 2023

🤔 that's an interesting idea. We could maybe convert it to coordinates, and then round it off to n (111km), or n.n (11km). 11km may still be too many cache misses, but 111km doesn't feel like it's granular enough. That's almost a 2 hour drive when using myself as a test.

Another thing we could try is what the Events Widget does, which is round off the last octet of the IP, so that it's just the class C address (e.g., 60.50.40.0). I'm guessing that also won't generate enough cache hits, though.

Maybe it'd be best to fetch the events via a REST request, so that it doesn't block the TTFB. That way we don't have to worry as much about caching 🤔

@iandunn
Copy link
Member Author

iandunn commented Dec 12, 2023

@fcoveram, can you create a design for this? I'm guessing it'll be similar to the Events Widget in Core, so we'd want a Select Location button that toggles an input field.

Screenshot 2023-12-12 at 3 25 55 PM

@iandunn
Copy link
Member Author

iandunn commented Dec 13, 2023

@StevenDufresne had a good idea, that this might not need a Select Location button. Instead we could just show the geolocated events, and if the visitor wants to see something different they can use the search/filters. Those don't exist in Core, but we can take advantage of them here.

Instead of the select button, we could have a chip for the geolocated city, with an x that someone can click on to remove it.

@StevenDufresne
Copy link
Contributor

Thinking something like this:

On Off
Screenshot 2023-12-13 at 9 33 31 AM Screenshot 2023-12-13 at 9 36 18 AM

@fcoveram
Copy link

I like the idea. I can polish Steve's idea this week 👌

@iandunn
Copy link
Member Author

iandunn commented Dec 13, 2023

Thanks!

@iandunn iandunn linked a pull request Dec 13, 2023 that will close this issue
@fcoveram
Copy link

Here is an idea I have been iterating

image

The feature is inside the "Country" filter, now renamed as "Location", and it appears as a first option showing the location name and the radio area. Once clicking on it, the search results page shows the results filtered as now.

I wonder how we can bring the location name as, afaik, it depends on the browser settings, and converting the distance unit for different metric systems (kilometers, miles, etc).

@iandunn
Copy link
Member Author

iandunn commented Dec 19, 2023

That sounds good 👍🏻

I'd recommend leaving off the distance, because the Events API has different ranges for different event types. Folks are willing to go farther to attend a WordCamp than a meetup, so we use 100km for meetups, and 400km for WordCamps.

@iandunn
Copy link
Member Author

iandunn commented Dec 20, 2023

@StevenDufresne and I were talking more about the problem of not having enough events displayed, and came up with the idea of showing both local and global events at the same time. One way to do that would be to have a section for each, something like:

Screenshot 2023-12-19 at 4 10 42 PM

@fcoveram
Copy link

Showing 10 events in the homepage was intentional to keep the page slightly short and give space for other sections. And since events are the main content, the "Browse events" button and the link in local nav reinforce the navigation to land on the "Upcoming events" page where currently there are many items. I disagree that the amount of events displayed is a problem.

I also understand that we plan to include more types of events in the future, so "Upcoming events" would be even longer.

I do like the idea of featuring global events, but it seems that fits better with the next phase of implementation, where more rich-content events are also included. What do you think of addressing this idea later?

@iandunn
Copy link
Member Author

iandunn commented Dec 20, 2023

I was thinking we'd still keep it to 10 events or less, but they'd be spread across the two sections. I don't have a strong opinion about addressing that now vs in the next phase. What do you think @StevenDufresne ?

@StevenDufresne
Copy link
Contributor

StevenDufresne commented Jan 3, 2024

@fcoveram Thinking about this iteration, I'm not certain that updating the country to be location and adding the cue that we've geolocated in that dropdown would be expected or obvious to our users. It makes the "location" dropdown unpredictable because it will show my location first and then a list of countries. It wouldn't be clear to me what is included in the list. Are they countries? Regions? Cities?

To elaborate on @iandunn's comment about our conversation, which wasn't specific to the details of your proposed design, is that we don't have many events for the rest of the world.

Here is how the conversation went:

  • We won't have many events for non-North American/European users
    • Okay, we can merge global (flagship and online) and local events together,
      • It's more likely for those users that 9 events are global and 1 is local
        • Because we include the date, the events are sorted chronologically
        • The local event could be at the bottom of the list and easily missed
          • Should we not sort chronologically or have a separate visual indicator to bubble up the local event?
          • Maybe we should break them into 2 lists?

@fcoveram
Copy link

fcoveram commented Jan 5, 2024

I see your point, and I like the idea of surfacing events out of the northern hemisphere to boost a more equitable overview.

With that approach in mind, plus the map in the top area, I'm drawn to have the following structure:

  • Cover area with map, where most pins will be in North America/Europe.
  • "Featured events" section showing regional WordCamps and other key events.
  • "Nearby events" section listing the closest events in a table where the "See all events" button is placed at the end.

The nearby section would replace the current upcoming events yet it keeps the search input, filters, and "see all events" button to redirect users to the "Upcoming events" page. This change means showing different content depending on your location, but as you both discussed, it addresses the geographical difference. My only doubt with this proposal is its compatibility with the browser's location permission, like the example below.

firefox location permission for Google Maps

What do you think of this?

@iandunn
Copy link
Member Author

iandunn commented Jan 9, 2024

When we built the Events Widget in Core, we decided to use IP geolocation rather than the browser. That was in order to avoid having to interrupt the user w/ that prompt. I assumed that we'd use the same approach here, what do you think about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⚠ On Hold/Blocked
Development

Successfully merging a pull request may close this issue.

4 participants