IRC logs for #farmOS, 2023-05-08 (GMT)

2023-05-07
2023-05-09
TimeNickMessage
[11:51:13]<mstenta[m]>symbioquine paul121 I'm preparing two farmOS-map PRs that I'd love to get your eyes on when you have a chance
[11:51:33]<mstenta[m]>The first just adds a simple upload-artifact step to our run-build.yml workflow
[11:51:36]<mstenta[m]>https://github.com/farmOS/farmOS-map/pull/193
[11:51:44]<mstenta[m]>(Adding CHANGELOG.md to that PR now... but ready for review otherwise)
[11:52:28]<mstenta[m]>The second splits some of the logic from layer.js out to a new features.js - so that we can expose a new readFeatures() helper with support for reading features from GeoJSON and WKT
[11:53:12]<mstenta[m]>This will help to simplify the farmOS PR I opened last week for refreshing the edit layer when WKT is pasted (which currently has to use a funky workaround to get features out of WKT)
[11:54:43]<mstenta[m]>https://github.com/farmOS/farmOS-map/pull/194
[11:55:18]<mstenta[m]>(need to add CHANGELOG.md line to that as well... but if you have a chance to review the first one quick I can merge that one first without a conflict on the changelog lines)
[11:55:33]<symbioquine[m]>mstenta[m]: It will probably also help with the total built size of stuff like the land drawing tool that currently includes copies of OL's WKT/GeoJSON implementations; https://github.com/symbioquine/farmOS_land_drawing_tool/blob/a5067047ad2...
[11:55:36]<mstenta[m]>PS symbioquine thanks for the reviews over the weekend!
[11:55:43]<symbioquine[m]>It will be interesting to see by how much...
[11:55:45]<mstenta[m]>Oh cool!
[11:56:26]<mstenta[m]>Well hopefully the way I did it makes sense - it seemed like a pretty simple reorganization
[11:56:28]<symbioquine[m]>> <@mstenta:matrix.org> This will help to simplify the farmOS PR I opened last week for refreshing the edit layer when WKT is pasted (which currently has to use a funky workaround to get features out of WKT)
[11:56:28]<symbioquine[m]> * It will probably also help with the total built size of stuff like the land drawing tool that currently builds in OL's WKT/GeoJSON implementations; https://github.com/symbioquine/farmOS\_land\_drawing\_tool/blob/a5067047ad2acf76cfceaf3ffaeaeeba9d719176/src/App.vue#L25-L26
[12:01:28]<mstenta[m]>> This will help to simplify the farmOS PR I opened last week for refreshing the edit layer when WKT is pasted (which currently has to use a funky workaround to get features out of WKT)
[12:01:28]<mstenta[m]>On a related note... This PR revealed a small bug in the modify interaction (I think) - unrelated to this PR specifically, and somewhat edge-case-y. I don't think it needs to block any of these things, but maybe we can take a look together on the dev call this week.
[12:02:20]<mstenta[m]>I showed it to Paul on Friday in the context of some other work I'm doing - but since then I've confirmed that it also happens with simpler cases, like the "wkt refresh" PR
[12:03:53]<mstenta[m]>A little hard to describe, but basically: when features are changed in a layer (NOT via modify/move interactions) it seems like something doesn't update properly in the modify interaction, so the first time you try to modify it, it doesn't work. But it does work the second time.
[12:03:57]<mstenta[m]>Move interaction works fine.
[12:05:02]<mstenta[m]>I have a hunch that the modify interaction is referencing the old features still and doesn't update until you try to use it... or something... I actually wonder if it's a core OL bug. Curious to show you and see what you think.
[12:09:48]<symbioquine[m]>mstenta[m]: Yeah, I'd like to see!
[12:10:02]<symbioquine[m]><mstenta[m]> "symbioquine paul121 I'm preparin..." <- Replied on both
[12:12:09]<mstenta[m]>Thanks!
[16:07:01]* Maty[m] has joined #farmos
[17:37:44]<mstenta[m]>symbioquine: I tested your suggestion and it seems that GeoJSON properties are NOT maintained
[17:38:20]<mstenta[m]>ACTION uploaded an image: (28KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/SNoryGnuMvL... >
[17:38:55]<mstenta[m]>Have you seen this work before in other contexts? Or were you just curious if it could be used that way? I'm not sure if this is a bug with the new readFeatures() method, or if this is expected behavior.
[17:46:41]<mstenta[m]>Hmm this implies it should be possible: https://stackoverflow.com/questions/69165558/openlayers-6-reading-proper...
[18:37:55]<paul121[m]>hmm I know we use the geojson properties that are configured in our asset geojson views
[18:38:28]<paul121[m]>those are geojson layers created from a URL though, so at least a little bit different