onaio / gisida

JavaScript library that converts MapSpec layers to beautiful, interactive maps using Mapbox GL
http://gisida.onalabs.org/
Apache License 2.0
11 stars 3 forks source link

On Spotlight the popup to show details does not show #428

Closed akahure closed 4 years ago

akahure commented 4 years ago

On https://spotlight.onalabs.org/

when a layer is turned on, the site does not show any popup data.

Scope

cKellyDesign commented 4 years ago

@akahure Unfortunately I can't figure out which combination of Gisida/-React/-Private branches this client is using and can't get spotlight-zimbabwe to compile on my machine.

@kelvin-muchiri @kahummer - Which branches is this using?

cKellyDesign commented 4 years ago

Deduction

It does look like the most recent bundle was either using an old version of Gisida or one of our Gisida versions that became divergent.

Behind the Scenes

Judging by type the error being thrown when mousing over them map, this line is trying to call a string function on a number...

Screen Shot 2020-02-14 at 10 39 05 AM

...and from the source of the error we can see how this could happen because the conditional is only checking that the value exists, not that it's a number...

Screen Shot 2020-02-14 at 10 39 05 AM copy

...yet if we check the code, this conditional looks different than what been compiled above and is actually checking that rowItem[val.trim()] is a number. In fact, if we check the blame view it looks like this issue was actually addressed a few months ago...

Screen Shot 2020-02-14 at 11 12 49 AM

...though may have only been merged to staging/master branches only recently, explaining why this fix is not included in this deployment.

The Fix

moshthepitt commented 4 years ago

Unfortunately I can't figure out which combination of Gisida/-React/-Private branches this client is using and can't get spotlight-zimbabwe to compile on my machine.

@kahummer @cKellyDesign it seems to me that as a priority this information for this client and others should be documented somewhere.

cKellyDesign commented 4 years ago

Agreed, our client repos are always private so we can simply add a section to the readme outlining which branches we're using. This requires some extra overhead to upkeep but then we wouldn't run into this problem.

moshthepitt commented 4 years ago

kahummer moved this from Parking Lot to Done in Gisida Projects (Client) 4 days ago

@kahummer do we need to close the issue while doing this?

cKellyDesign commented 4 years ago

@kahummer do we need to close the issue while doing this?

Closing this ticket will shift column to Done, but not the other way around it seems.

Just "reopened" it anyways to track:

I will open a new ticket to do this task on our other active client repos.

cKellyDesign commented 4 years ago

add a section to the readme outlining which branches we're using

Let's not do this. See https://github.com/onaio/gisida/issues/431 for more details.