< 152023-03-16⋎17 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
12:21*farmBOT has joined
15:47symbioquine[m]Dev call in about 14 minutes: meet.jit.si/farmos-dev
20:20mstenta[m]paul121 symbioquine: i started digging into creating an `inline_container` element, and i'm vacillating a little...
20:20mstenta[m]feels like overkill a little - since it's essentially just extending the existing container element and adding a CSS file
20:21mstenta[m]what if instead we just add some CSS to farm_ui_theme for this case
20:22mstenta[m]and tie it to container elements specifically
20:23mstenta[m]so from a developer's perspective, you would just do:... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
20:23mstenta[m]and farm_ui_theme (being more directly tied to the presentation layer) decides what that means (for Gin specifically)
20:24mstenta[m]so... it would basically be what i proposed in github.com/farmOS/farmOS/pull/654, except the CSS would be in farm_ui_theme not farm_quick
20:25mstenta[m]> feels like overkill a little - since it's essentially just extending the existing `container` element and adding a CSS file
20:25mstenta[m]part of me worries that we're just creating another thing to maintain with a new element, and once people start using it there's no removing it
20:26mstenta[m]and `'class' => ['inline'],` is pretty trivial to add in quick forms (or ANY form for that matter, if we handle the styling in `farm_ui_theme`)
20:27mstenta[m]AND... if someone wants to swap out Gin for something else they can... they just need to define the rules for .inline containers
20:28mstenta[m]> and tie it to `container` elements specifically
20:28mstenta[m]hmm... dang... i was assuming that `container` elements added some unique class to designate them as "containers"... but now that I'm looking at the markup it doesn't look like they do :-(
20:30mstenta[m]there is a form-wrapper class on the container... so maybe that could be targetted...
20:31*sent a code block: libera.ems.host/_matrix/media/v3/downloa
20:35symbioquine[m]<mstenta[m]> "and farm_ui_theme (being..." <- I was thinking about suggesting something along those lines during the dev call earlier...
23:17paul121[m]> <@mstenta:matrix.org> > feels like overkill a little - since it's essentially just extending the existing `container` element and adding a CSS file
23:17paul121[m]>
23:17paul121[m]> part of me worries that we're just creating another thing to maintain with a new element, and once people start using it there's no removing it
23:17paul121[m]that is true, this is a downside of the element approach. The good thing it provides is an abstraction though, so if the actual implementation of an inline element changes, they don't have to worry. Adding this single CSS class feels a bit fragile in the long term
23:17paul121[m]What if we provide a helper method for an abstraction to this? Here is what I'm doing in rothamsted module: github.com/Rothamsted-Ecoinformatics/far
23:18paul121[m]one day if gin provides an inline element we can just change it to `#type => 'gin-container-inline'` or whatever
23:19paul121[m]^ this is why I made the helper method... didn't want to hard-code those values everywhere.... only need to change it in one place :-)
23:20paul121[m]and if farmOS core adds such a feature, my existing helper method could just delegate to it
23:21paul121[m]Maybe farm_ui_theme could provide an ElementHelperTrait or something

< 152023-03-16⋏17 >