IRC logs for #farmOS, 2022-08-31 (GMT)

2022-08-30
2022-09-01
TimeNickMessage
[20:20:37]<symbioquine[m]><mstenta[m]> "Yea the enforced dependency..." <- I ended up changing the url format to include the "source module" rather than taking it from from enforced dependencies since I think it might be useful for a module to be able to provide optional config entities for Asset Link plugins that should only be enabled when certain other farmOS modules are enabled. The way I was getting the module from the enforced dependencies would have gotten
[20:20:38]<symbioquine[m]>in the way of that usage.
[20:21:21]<symbioquine[m]>Now it's much more explicit;... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/e0697b7d42...)
[20:22:05]<symbioquine[m]>([ref commit](https://github.com/symbioquine/farmOS_asset_link/commit/63d675e93cedc354...))
[20:25:41]<symbioquine[m]>> I think it might be useful for a module to be able to provide optional config entities for Asset Link plugins that should only be enabled when certain other farmOS modules are enabled
[20:25:41]<symbioquine[m]>e.g. A module might provide plugins for market gardening and have certain asset actions that are only enabled when the material asset type is also available in the data model.
[20:29:49]<symbioquine[m]>* might provide Asset Link plugins for
[20:33:34]<mstenta[m]>That makes sense!
[05:08:34]<FarmerEd[m]>symbioquine: had a little play with the code from your bale example and I think Asset Link will be a very useful field tool.
[05:08:34]<FarmerEd[m]>Obviously still pre-Alpha with lots of work in progress, I created a json list for my own repo and it works but does not get stored so, does not survive a browser restart. Is this planned for cache storage? Or the ability to add to backend storage could be great to synchronize plugins across devices.
[05:13:38]<FarmerEd[m]>ACTION uploaded an image: (101KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/OZjiXUIZceA... >
[05:13:48]<FarmerEd[m]>ACTION uploaded an image: (108KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/AJYPyXwUfAY... >
[09:40:11]<symbioquine[m]>> <@farmer-ed:matrix.org> symbioquine: had a little play with the code from your bale example and I think Asset Link will be a very useful field tool.... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/f937f746db...)
[09:41:36]<symbioquine[m]>> you can add urls to the default plugin list through the farmOS UI
[09:41:37]<symbioquine[m]>By clicking "Settings", then going to the "Asset Link default plugins" tab
[09:45:16]<symbioquine[m]>> make peer-to-peer sharing/synchronization of plugins compelling/convenient/**secure**
[09:45:16]<symbioquine[m]>To the last point about plugin security, my main strategy thought has been that it will make sense to expand the ecosystem of plugin types to include support for more non-code/JSON data formats that express common use-cases - like recording quantity logs. Those data format plugins would require less trust because they would be more limited in what they could do...
[09:46:59]<symbioquine[m]>In [this post](https://farmos.discourse.group/t/asset-link-dev-log/1175/18?u=symbioquine) I demonstrated the functionality I released that allows plugins to interpret the data of other plugins and define functionality on their behalf.
[09:48:18]<symbioquine[m]>Soon, I hope to add better documentation/examples about that.
[09:48:46]<FarmerEd[m]>creating a plugin with the editor does not seem to be getting saved in cache either
[09:49:16]<symbioquine[m]>FarmerEd[m]: Interesting! What browser/OS/version?
[09:49:58]<FarmerEd[m]>Win 11 Chrome Version 104.0.5112.81 (Official Build) (64-bit)
[09:50:35]<FarmerEd[m]>Ill give Firefox a go now
[09:57:35]<symbioquine[m]>I probably should test more often in Chrome, I could easily have missed it if IndexedDB isn't getting persisted between browser restarts - though that would be surprising behavior...
[09:58:34]<symbioquine[m]>Maybe it gets more aggressive with clearing data if the data size is large.
[10:05:18]<FarmerEd[m]>Firefox saves from the editor to IndexexedDB but chrome it just disappears
[10:05:42]<FarmerEd[m]>Do you want me to open an issue?
[10:06:20]<symbioquine[m]>Sure 😁
[10:06:45]<symbioquine[m]>https://github.com/symbioquine/farmOS_asset_link/issues
[10:07:23]<FarmerEd[m]>or even 2 πŸ˜€
[10:07:31]<symbioquine[m]>Yeah, go to town if you like
[10:19:24]<FarmerEd[m]><symbioquine[m]> "I probably should test more..." <- IndexedDB persists between restarts, but the plugin is not getting saved. As in plugins added by URL persist.
[11:40:06]<mstenta[m]>@room Weekly farmOS dev call is at noon Eastern today (20 minutes): https://meet.jit.si/farmos-dev
[11:40:27]<mstenta[m]>I'm still interested in talking about the bits I mentioned above, but I may be a little late to the call today...
[11:41:46]<symbioquine[m]>mstenta[m]: Tomorrow?
[11:42:19]<symbioquine[m]>it's normally on Thursday
[11:42:22]<FarmerEd[m]>Thought I'd lost a day thereπŸ€”
[11:54:13]<mstenta[m]>omg sorry!
[11:54:26]<mstenta[m]>off by one error! πŸ˜†
[11:54:47]<mstenta[m]>oh man that's actually a huge relief lol
[11:54:58]<symbioquine[m]>Haha, yeah
[11:55:17]<symbioquine[m]>Was thinking I had a bit more time to look over those issues at some point here...
[11:55:44]<mstenta[m]>i might be a little overworked rn πŸ˜…
[12:32:51]<symbioquine[m]>Farmer Ed: You're 3 for 3 on bug finding now. I can reproduce both of those ones you opened issues for 🧐
[12:36:16]<FarmerEd[m]>Cool, it'll give you something to do, I know how you are at a loose end these days 🀣
[12:39:50]<symbioquine[m]>Yeah πŸ˜…
[14:37:57]<Mo[m]>mstenta: you should join the `ddev` family! life will be so much easier haha
[14:40:11]<paul121[m]>Mo and I have been using ddev for local development and hope to start & share a repo on how we have it setup soon :P
[14:41:00]<mstenta[m]>Haha maybe I will!
[14:41:06]<mstenta[m]>I keep hearing about it :-)
[14:41:21]<mstenta[m]>Old dog / new tricks... πŸ˜„
[15:53:33]<Mo[m]>haha
[16:15:15]<FarmerEd[m]>symbioquine: I see you wasted no time with 0.6.1, guess I'll have to look for a few new bugs for you.
[16:25:32]<FarmerEd[m]>Is it possible to define a plugin in a module if asset link exists, but ignore otherwise?
[16:28:54]<symbioquine[m]>Yeah, I think you could just put the config yml in `/config/optional/` and make only the config, but not the module depend on Asset Link.
[16:30:09]<FarmerEd[m]>Nothing in particular in mind but I could see a situation where a module could have an optional asset link plugin for those who use asset link but would still need to be installable for those who don't.
[16:30:40]<symbioquine[m]>I haven't tested that, but that's my understanding of how config modules can be used. Maybe mstenta knows off hand and can confirm...
[16:31:20]<symbioquine[m]>s/modules/entities/
[16:31:45]<mstenta[m]>Yes! That's the exact use-case for "optional" config
[16:31:50]<mstenta[m]>It will only be installed if all the necessary dependencies exist
[16:33:20]<mstenta[m]>That way, your module can provide other stuff, without a hard dependency on asset link... but also provide asset link plugins (as config entities) that will be installed IF asset link is present
[16:33:39]<mstenta[m]>Isn't that neat? πŸ˜„
[16:36:58]<symbioquine[m]>What happens if the dependency is installed after the dependant?
[16:37:51]<FarmerEd[m]>It is! Could see it being a consideration for developing modules in future that can supply a plugin for Asset Link but not strictly depend on it.
[16:39:54]<mstenta[m]>> What happens if the dependency is installed after the dependant?
[16:39:54]<mstenta[m]>It will install the asset link plugins!
[16:40:46]<FarmerEd[m]>symbioquine[m]: The not so dependant dependants?
[16:48:15]<mstenta[m]>My understanding is: when a module gets installed, Drupal scans all the `config/optional` directories to see if there's any config that has all it's dependencies met, and then will install them too
[16:49:09]<mstenta[m]>I haven't experimented much with it, though... I've only used it for relatively simple cases... so ymmv
[16:49:23]<mstenta[m]>(but from the sound of it, these would be simple cases, so should work great)
[16:49:31]<symbioquine[m]>mstenta[m]: Nice!
[17:55:27]<paul121[m]>So someone just requested a "Digital" asset type because they want to upload files/contracts/documents. I turned on Media + Media library modules and had a poke around. Seem quite powerful just out of the box. Any options on the media entity type?
[18:01:34]<mstenta[m]>I haven't tried it
[18:01:57]<mstenta[m]>But the idea of a "document" asset type has come up
[18:06:45]<paul121[m]>s/options/opinions*/
[18:09:12]<paul121[m]>I'm curious the reasons for having it be a full-fledged asset type. Surely there are some that we could dream up. But if you could reference media from assets/logs it seems like that could achieve something similar, although perhaps more complex
[18:12:33]<mstenta[m]>I guess I need to see how Media works
[18:13:18]<mstenta[m]>I'm assuming there would need to be some additional top-level menu item to provide access to "documents"?
[18:13:40]<mstenta[m]>Aka media entities?
[18:14:27]<mstenta[m]>Or would all navigation to those entities go through assets/logs?
[18:19:38]<paul121[m]>I think we want an additional menu, yea. The media library module provides a nice UI (hint: its just views!) for searching for media
[18:20:10]<paul121[m]>I think part of the goal is to have a nice place to upload documents that aren't necessarily associated with an asset
[18:21:30]<paul121[m]>But obviously linking an asset to media entities would be useful. I realize this creates a bit of a conundrum...
[18:23:10]<paul121[m]>At a simple level my understanding is that the Media entity is a File entity with additional metadata (fields!). You can have media types (bundles) to decide which media type gets what additional fields.
[18:23:15]<mstenta[m]>I wonder: does the Media module offer a field widget type for file/image fields? Could we just start using that on the existing fields? Would that bring the existing files/photos into a new organizational UI auto-magically?
[18:24:15]<mstenta[m]>(I've always been curious about the new Media stuff... just started simple and figured we'd explore it eventually)
[18:25:13]<mstenta[m]>Don't want to over-complicate the existing workflow either though
[18:25:22]<paul121[m]>okay I'm going to take a little screen recording of what my local env has, I'll have to destroy it later but want to capture this. one sec :-)
[18:26:17]<mstenta[m]>(might have to watch later... dinnertime here)
[18:30:18]* farmBOT has joined #farmos
[18:30:26]<paul121[m]>ACTION uploaded a video: (11172KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/gzzbJjtjBvw... >
[18:31:30]<paul121[m]><mstenta[m]> "I wonder: does the Media..." <- added a quick media field to an asset, it does have a nice widget
[18:31:38]<paul121[m]>ACTION uploaded an image: (62KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/gyWVwkbRRmG... >