cncf / cncf.io

☁️♮🏛🚧 The CNCF.io WordPress website
https://cncf.io
MIT License
84 stars 38 forks source link

Popup issues with map/filter people listing #902

Open cjyabraham opened 2 weeks ago

cjyabraham commented 2 weeks ago

When you play around with one of our people listings that have a map, there are a couple of issues:

  1. When you filter for just one country, the map still shows everyone, and when you click on someone not in that country, a blank popup appears. It's blank since the popup data is no longer present on the page.
  2. When someone doesn't have a bio, we normally don't provide a link to a popup for them. On the map, however, we always provide a link. When someone were to click on one of these people on the map, they get a blank popup.

For (1) we should investigate whether it's possible to load all popup data separate from the filter listing. That way it would make the map popups independent of what is being filtered. For Kubestonauts, this may introduce a scalability issue. The page is going to get even larger than it already is, but we could experiment with it.

For (2) I suggest we revert to always showing a popup for everyone. If a bio isn't provided, we could show text like "Bio not provided" or maybe no special treatment is needed.

cjyabraham commented 6 days ago

I solved (2) by not requiring a minimum-length bio in order to show a popup. Example with no bio is here.

cjyabraham commented 6 days ago

For (1) @thetwopct suggested:

The Search Filter adds the country to the URL, so we could use this to update the map of data?

  1. We ask for the Persons location, but this is not from a qualified data set so we cant use that as a reliable guide (i.e. Tunis is Tunisia in our country list) (Could we update their locations based on the lat/long and not ask them for their location name?)
  2. We could setup data mapping based on lat/long i.e. if _sft_lf-country=africa, show people matching with long/lat in the Africa range. This could be a pain to setup, but once done its done.

We could also listen to the Ajax from Search Filter? Instead of the map having its own people data, we use the data from S&F, and then when it updates we parse it and then update the markers.

cjyabraham commented 5 days ago

What about having the modal contents load via ajax when the modal popup opens? This would help with two issue:

The downside is that it might be a bit slower to load modal contents.