IRC logs for #farmOS, 2021-06-11 (GMT)

2021-06-10
2021-06-12
TimeNickMessage
[00:20:17]* farmBOT has joined #farmos
[01:18:12]* svenn has quit (K-Lined)
[10:33:09]<symbioquine[m]><symbioquine[m] "I can take a look tomorrow - abo"> I think the changes may be slightly broken/fragile in that they don't set weights on the behaviors, but `farmOS.map.behaviors.asset_type_layers` depends on side-effects from `farmOS.map.behaviors.popup` https://github.com/farmOS/farmOS/blob/46c70131ffb603a8869e00d047fdf65107...
[10:33:59]<symbioquine[m]>Not absolutely sure about the determinism of JS object key iteration, but I suspect that's non-deterministic...
[10:35:31]<mstenta[m]>ah so to summarize we could end up seeing `asset_type_layers` load before `popup`
[10:35:42]<mstenta[m]>in which case `instance.popup` would not be set
[10:36:14]<symbioquine[m]>I think so. Just checking whether JS guarantees the object key iteration order...
[10:36:36]<mstenta[m]>(my internal questions to investigate later: did we have weights in 1.x? we haven't seen that happen, but would it happen now in 2.x + farmOS-map 1.x, and/or with 2.x + farmOS-map 2.x)
[10:36:55]<mstenta[m]> * (my internal questions to investigate later: did we have weights configured on these two behaviors explicitly for this in 1.x? we haven't seen that happen, but would it happen now in 2.x + farmOS-map 1.x, and/or with 2.x + farmOS-map 2.x)
[10:37:22]<mstenta[m]>(my head is in something else so i can't dig in at the moment - just sharing thoughts/questions that come to mind)
[10:37:54]<symbioquine[m]>Yeah, no rush :) I'll see if I can find any answers in the meantime.
[10:41:10]<mstenta[m]>did you experience this issue in testing? or just came to mind looking at code?
[10:41:39]<symbioquine[m]>Just from looking at the code
[10:43:19]<mstenta[m]>that logic was carried over pretty much unchanged from 1.x FWIW
[10:43:28]<mstenta[m]>although the weights is an open question
[10:43:47]<symbioquine[m]>It looks like it will probably always work because JS seems to iterate over Object keys in insertion order for non-numeric keys: https://stackoverflow.com/questions/5525795/does-javascript-guarantee-ob...
[10:44:05]<mstenta[m]>interesting! didn't even think about that consideration
[10:44:07]<symbioquine[m]>I don't think we should depend on that, but that's a different question.
[10:44:21]<mstenta[m]>yea
[10:44:37]<symbioquine[m]>https://github.com/farmOS/farmOS-map/blob/04a360b91bc0ee491e146894d5127b... (and JS sort is stable too)
[10:45:09]<mstenta[m]>doesn't look like we had weights on those behaviors in 1.x either...
[10:45:21]<symbioquine[m]>yep
[10:45:23]<mstenta[m]>popup: https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_map/js/f...
[10:45:31]<mstenta[m]>area details: https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_area/js/...
[10:45:55]<symbioquine[m]>so it was just depending on the order in which the JS got loaded :)
[10:46:00]<mstenta[m]>(here's an example where we DID use weight: https://github.com/farmOS/farmOS/blob/2b64bc8e7c6c307c2a32366a0636651528...)
[15:46:12]* svenn has joined #farmos
[18:32:01]<JSimonGoodall[m]>Hello good people, any idea why I would get this message "Uncaught TypeError: i.elementFromPoint is not a function" when I try to change background map to google? I have already inserted a valid API key. I am using a docker container
[18:44:21]<mstenta[m]>Hi J.Simon Goodall - hmm haven't encountered this before. What browser/version are you using?
[18:44:53]<JSimonGoodall[m]>firefox 89.0
[18:45:10]<JSimonGoodall[m]>good idea :( will try it in another browser
[18:45:10]<mstenta[m]>Found this: https://stackoverflow.com/questions/2904753/document-elementfrompointx-y...
[18:47:14]<mstenta[m]>I use Firefox and haven't encountered this
[18:47:33]<mstenta[m]>But definitely worth trying in another browser
[18:47:48]<mstenta[m]>Sounds like a client side browser issue
[18:48:18]<JSimonGoodall[m]>Chromium and Opera give me the same error
[18:48:33]<mstenta[m]>Huh
[18:49:15]<JSimonGoodall[m]>with the API key it is only the key itself I asume, you don't have to feed it key=.....
[18:49:56]<JSimonGoodall[m]>and the javascript console does not mention anything of the key anyway
[18:57:39]<JSimonGoodall[m]>Solved, sorry for wasting your time, created the key but did not enable it...
[19:08:12]<mstenta[m]>Oh good!