IRC logs for #farmOS, 2023-02-24 (GMT)

2023-02-23
2023-02-25
TimeNickMessage
[06:20:02]<lordeddi[m]>configurable tables in frontend: https://www.tabulator.info/
[06:21:52]<lordeddi[m]>but it might even be cleaner and simpler if written it from scratch
[08:08:18]<mstenta[m]>lordeddi: neat!
[08:09:09]<mstenta[m]>So... either way I think our main constraint from a coding perspective will be figuring out how to apply it to the existing HTML output.
[08:09:25]<mstenta[m]>Since we don't have control over what the markup looks like.
[08:09:28]<lordeddi[m]>also, i don
[08:09:40]<lordeddi[m]>* i don't yet have an idea how pages are constructed
[08:10:04]<lordeddi[m]>it would be easy to have data in json form in the frontend. but i can imagine a page is build by drupal in the backend including those tables
[08:10:07]<mstenta[m]>Ideally this would be something that can be applied ONLY as a javascript function that runs on the page.
[08:10:39]<lordeddi[m]>and like you mentioned, keep the config in localStorage
[08:10:39]<mstenta[m]>Right. Drupal builds the HTML.
[08:10:39]<lordeddi[m]>to me that would suffice
[08:11:27]<lordeddi[m]>but an api call can be done after page load? that might make things a bit weird and split up though 🤔
[08:11:54]<mstenta[m]>> but it might even be cleaner and simpler if written it from scratch
[08:11:55]<mstenta[m]>might *have* to do this, just because it might be hard/impossible to force something like tabulator to work with existing markup
[08:12:39]<lordeddi[m]>yeah, my 2c too, best to experiment. Its nice to see it has been done and def. we can learn from that project :D
[08:13:27]<mstenta[m]>honestly it might be easier to make these tables configurable server-side instead of client-side
[08:14:03]<mstenta[m]>(eg: with a configuration form that saves to the database, and then that is used when the HTML itself is built)
[08:14:17]<lordeddi[m]>maybe you are right, if that table gets "filled" in the backend page construction, then passing a JS function along to change order e.g. would not be too difficult
[08:14:24]<mstenta[m]>less snazzy than client-side JS w/ drag+drop, but probably much simpler code, we can write automated tests for it etc
[08:14:25]<lordeddi[m]>a matter of changing CSS even using JS
[08:14:51]<mstenta[m]>if you think doing it all client side is possible, it's worth a shot!
[08:15:16]<mstenta[m]>i have limited JS powers myself, so it seems difficult to me 😅
[08:15:41]<lordeddi[m]>I would love to give it a try, hope to find some time :D
[08:16:27]<lordeddi[m]>OTOH i also see a use for, like you mentioned, doing it all in the backend. thus storing the users settings there as well
[08:16:48]<lordeddi[m]>they all have pros and cons i guess
[08:17:25]<mstenta[m]>yea...
[08:17:47]<mstenta[m]>doing it server-side might just be a site-wide setting... not user-by-user
[08:17:57]<mstenta[m]>(at least that would be easier... user-by-user is also possible, but more complicated)
[08:18:15]<mstenta[m]>the other benefit of server-side is it persists forever... not just in the browser
[08:18:54]<lordeddi[m]>yup, so switching from laptop to phone does not require configuring it again
[08:21:48]<mstenta[m]>(unless we also had a mechanism for saving the setting from client-side to the database... which is possible... but at that point it just feels easier to do it all server-side).
[08:22:34]<lordeddi[m]>that's why i mentioned that grab-n-order thingy in the locations page, you might already have some logic for it
[08:22:42]<lordeddi[m]>maybe i'm wrong though 😅
[08:23:17]* farmBOT has joined #farmos
[08:23:55]<lordeddi[m]>i see that table has some HTML id's on most columns, which makes using JS quite easy.
[08:23:56]<lordeddi[m]>`document.getElementById` and grab the columns then re-create/overwrite the existing table... hahah i'm sure nothing can go wrong with that approach 😆
[08:27:33]<mstenta[m]>> that's why i mentioned that grab-n-order thingy in the locations page, you might already have some logic for it
[08:27:33]<mstenta[m]>ah yea that one is unique, and is designed more from the client-side perspective to use this library: http://inspire-tree.com/
[09:47:33]<symbioquine[m]><mstenta[m]> "You should actually regular-blog..." <- Any objection to it being a pretty light-weight post similar to https://farmos.org/blog/2022/farmos-in-5-minutes-video (With maybe a tiny bit more of a preface/disclaimer about Asset Link being both a contrib module and pre-alpha.)
[09:50:51]<symbioquine[m]>* to https://farmos.org/blog/2022/farmos-in-5-minutes-video? (With
[09:51:17]<mstenta[m]>that's what i was thinking too :-)
[09:51:22]<symbioquine[m]>Cool
[09:51:43]<mstenta[m]>should we use the "(video)" convention of indicating that a post is mostly a video?
[09:51:52]<symbioquine[m]>yes
[11:00:04]* dazinism[m] has quit (Quit: You have been kicked for being idle)
[12:11:59]<symbioquine[m]>I guess we don't have Netlify preview generation for the farmOS-community-blog repository pull requests?
[12:13:18]<symbioquine[m]>Hmmm, seems like we should: https://github.com/farmOS/farmOS-community-blog/issues/5
[12:14:54]<symbioquine[m]>Is there an easy way to see if Netlify "workflows" (is that the right word) are getting queued/triggered?
[12:15:04]<symbioquine[m]>Maybe you know ^ paul121?
[12:25:01]<paul121[m]>> Is there an easy way to
[12:25:01]<paul121[m]>No, I don't think so
[12:25:41]<paul121[m]>I think if we merge into the farmOS-community-blog/netlify-preview branch then Netlify will create a preview
[12:26:17]<paul121[m]>But then:
[12:26:17]<paul121[m]>- I'm not sure how to access the preview
[12:26:17]<paul121[m]>- And not sure the best way to do this from a PR workflow
[12:26:45]<symbioquine[m]>I was hoping it would work like this: https://github.com/farmOS/farmOS.org/pull/67#issuecomment-1436390590
[12:26:58]<symbioquine[m]>ACTION uploaded an image: (62KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/AFisboJjZMU... >
[12:27:10]<paul121[m]>Right
[12:27:33]<paul121[m]>There is this! https://github.com/farmOS/farmOS-community-blog/blob/netlify-preview/.gi...
[12:27:36]<symbioquine[m]>I know there's an extra layer of indirection in the farmOS-community-blog case
[12:29:19]<paul121[m]>And it seems like Netlify can accept env variables via that API. So we could perhaps paramterize the farmOS/farmOS-community-blog branch to use. But this would require a change in farmOS/farmOS.org. I described this here: https://github.com/farmOS/farmOS-community-blog/issues/5#issuecomment-13...
[12:29:23]<paul121[m]>but that is only a theory :-)
[12:38:31]<symbioquine[m]>Okay, well for now I guess I'll try to test my pull request a little more thoroughly locally and post a screenshot to the PR...
[12:43:16]<mstenta[m]>I'm sure it's fine symbioquine
[12:43:25]<mstenta[m]>Just needs an approval from paul121 or jgaehring to merge
[12:45:11]<symbioquine[m]>mstenta[m]: Well, I'm paranoid: https://github.com/farmOS/farmOS-community-blog/pull/12#issuecomment-144...
[12:56:25]<symbioquine[m]>> https://www.youtube.com/watch?v=VnZac6lA1_k
[12:56:26]<symbioquine[m]>Seems like some of the stuff shown here could lead to some very interesting low-cost farmOS-integrated devices...
[13:01:09]<FarmerEd[m]>actually trying to integrate some ESP32's right now 😁
[13:01:50]<FarmerEd[m]>Probably not as interesting as it's just EID readers
[13:15:33]<FarmerEd[m]>Maybe there's enough categories but a hardware section could be interesting 🤔
[13:25:17]<symbioquine[m]>https://forum.goatech.org/c/farmhack/21
[13:29:49]<mstenta[m]>symbioquine: you just sent me down memory lane :-)
[13:29:50]<mstenta[m]>https://farmhack.org/forums/discuss-possible-platform-collaboration
[13:31:07]<FarmerEd[m]>Is it still active though? I tried signing up to the site a few times but never managed to get a login.
[13:31:18]<mstenta[m]>goat? or farmhack?
[13:36:18]<FarmerEd[m]>Farmhack
[13:37:01]<mstenta[m]>oh yea dunno the status of that
[13:37:47]<mstenta[m]>but https://forum.goatech.org/c/farmhack/21 would be a good place to continue