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

2023-02-26
2023-02-28
TimeNickMessage
[21:09:58]<paul121[m]><paul121[m]> "Maybe we could have a button..." <- Took a stab at this today. This "Edit" button here is basically the same as the contextual links button that drupal core provides. Opens up an off-canvas form & saves the selection to browser localstorage. I also added the "views display extender" so this can be configured on views in views_ui. Only hiding the columns here, but lordeddi the table in the "off canvas form" can have the "table
[21:09:58]<paul121[m]>drag" feature enabled. Could potentially drag the column order there. But gosh.... changing table columns via JS is complex, eh?!
[21:10:18]<paul121[m]>ACTION uploaded a video: (915KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/ceMDJbIOvrZ... >
[21:10:19]<paul121[m]>ACTION uploaded a video: (2217KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/stXSUqJOJMN... >
[21:11:10]<paul121[m]>> <@paul121:matrix.org> Maybe we could have a button that opens a "column form" modal on top of the table... instead of trying to fit this form into the existing UI, just drop it on top when needed... (but need to see how modal works on mobile)
[21:11:10]<paul121[m]> * Took a stab at this today. This "Edit" button here is basically the same as the contextual links button that drupal core provides. Opens up an off-canvas form & saves the selection to browser localstorage. I also added the "views display extender" so this can be configured for individual views in views_ui. Only hiding the columns here, but lordeddi the table in the "off canvas form" can have the "table drag" feature enabled. Could
[21:11:10]<paul121[m]>potentially drag the column order there. But gosh.... changing table columns via JS is complex, eh?!
[21:11:44]<paul121[m]>not finished but fairly close if we wanted to pursue this approach. https://github.com/paul121/farmOS/tree/2.x-table-column-preference
[01:59:12]<lordeddi[m]>😅 sorry to have brought it up paul121 now you are too going down that 🐇 🕳️ ...
[01:59:13]<lordeddi[m]>well, cofiguring tables is only ignoring lots of html clutter mostly. considering it's all loops which keep track of what element, since all colum indexes count both header and eachh row element.
[02:01:13]<lordeddi[m]>like i said before, my script isn't the prettiest :)
[02:01:13]<lordeddi[m]>but it kindo of works. I wanted to have the header innerText as key and index (where the user wants it in the table) in that localStorage
[02:02:00]<lordeddi[m]>i guess it's a bit of a no-no to change an existing table in HTML DOM 🙄
[02:02:56]<lordeddi[m]>also, i'm not sure how all this would work with drag'n'drop, my script only had those 2 arrows, which conveniently looked like they where meant for that, but alas,... they where click-only arrows :)
[02:05:16]<lordeddi[m]>On a semi-related topic:
[02:05:17]<lordeddi[m]>I noticed that when creating a seeding log, when i add a quantity which decrements an assed.
[02:05:17]<lordeddi[m]>when looking up that asset, it provides me with that asset-search modal. And in that modal we don't get to see the column for quantities... (i bet there's a reason, prob. multiple quantities on that asses are difficult to show....)
[02:13:00]<lordeddi[m]>s/assed/asset/
[02:25:22]<paul121[m]>> <@lordeddi:oblak.be> On a semi-related topic:
[02:25:22]<paul121[m]>> I noticed that when creating a seeding log, when i add a quantity which decrements an asset.
[02:25:22]<paul121[m]>> when looking up that asset, it provides me with that asset-search modal. And in that modal we don't get to see the column for quantities... (i bet there's a reason, prob. multiple quantities on that asses are difficult to show....)
[02:25:22]<paul121[m]>Ah okay - you'd like the current inventory to appear in the table view of assets, specifically the asset "entity browser" search? (just using the geeky terms!) You're right, that could be challenging because there could be multiple inventories. Also challenging because that needs to be computed/queried on the fly. Could be hard if many assets had inventories.
[02:27:46]<lordeddi[m]>hm... i thought so, nah, it's not that important.
[02:28:26]<paul121[m]>It would be good to show that in an "inventory dashboard" of some kind! But maybe not everywhere
[02:32:48]<lordeddi[m]>i only noticed it, since i was looking in that table to see how many seeds i had left of something, to make sure i select the right asset.
[02:39:02]<lordeddi[m]><mstenta[m]> "but simple enough to add..." <- i created a PR, lemme know if you want me to change anything...
[02:39:09]<lordeddi[m]>https://github.com/farmOS/farmOS/pull/645
[04:00:17]* EricLarese[m] has quit (Quit: You have been kicked for being idle)
[04:45:31]* jsoons[m] has quit (Ping timeout: 246 seconds)
[04:45:51]* jsoons[m] has joined #farmos
[04:47:16]<lordeddi[m]>another html table library: https://datatables.net/
[08:53:55]<mstenta[m]>> Btw; I merged this yesterday evening after Paul approved it: https://farmos.org/blog/2023/introducing-asset-link-contrib-module-video
[08:53:55]<mstenta[m]>https://fosstodon.org/@farmOS/109937027655133804
[08:54:08]* heartburn has quit (Ping timeout: 248 seconds)
[09:00:47]* heartburn has joined #farmos
[11:00:21]* evered[m] has quit (Quit: You have been kicked for being idle)
[15:05:17]* farmBOT has joined #farmos