< 022023-04-03⋎04 >

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
03:09*Mo[m] has joined
03:09Mo[m]Yeah, it wasn't too hard and using the preprocess hook, it's easy to manipulate.
09:00*piegeux[m] has quit (Quit: You have been kicked for being idle)
16:18mstenta[m]jgaehring paul121 symbioquine wotnak ^
16:18mstenta[m]> application sent! we'll see if they accept us 🤞
16:18mstenta[m]Good news! Netlify accepted farmOS as an open source organization! 🎉
16:36mstenta[m]I need to set up the account and add everyone as a user
16:36mstenta[m]They also sent instructions for transferring projects to the new org if we want to
17:02mstenta[m]Also: I tried getting 2.0.4 released, but ran into a failing test after updating Drupal core that I need to investigate
17:28paul121[m]amazing! maybe we could move the farmos-demo site over too - that is a netlify site :-)
17:29mstenta[m]oh cool! didn't know that :-)
17:30mstenta[m]one thing that they did note in the email is we are still bound by the limits on traffic etc, and if we go over we gotta pay uo
17:30mstenta[m]up*
17:31mstenta[m]maybe worth reviewing the current stats on farmOS.org and the demo site
17:32mstenta[m]i'm sure it's all within the limits, but it would be good to have a baseline for historical reference
17:34paul121[m]totally. the demo site does use netlify functions (like aws lambda/"serverless") but I think they are well within the free tier. the actual demos are hosted on a free Tugboat.qa tier
17:35mstenta[m]ah cool
17:36mstenta[m]> Also: I tried getting 2.0.4 released, but ran into a failing test after updating Drupal core that I need to investigate... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
17:37paul121[m]link to GH action?
17:37mstenta[m]github.com/mstenta/farmOS/actions/runs/4
17:39mstenta[m]That is 2.x on my fork, which has two additional commits:
17:39mstenta[m]1) github.com/mstenta/farmOS/commit/e3d2a62
17:39mstenta[m]2) github.com/mstenta/farmOS/commit/ec27773
17:39mstenta[m]2.x on origin is passing
17:39mstenta[m]So it probably has something to do with drupal 9.5.7... ? 🤷
17:40mstenta[m]Or 9.5.6, actually... 9.5.7 came out right after and just reverts one of the commits in 9.5.6... but most of the changes are in 9.5.6
17:40mstenta[m]www.drupal.org/project/drupal/releases/9
17:50paul121[m]so doesn't have disabled attribute
17:51paul121[m]github.com/farmOS/farmOS/blob/a56fccaa8f
17:56mstenta[m]yea
17:58mstenta[m]hmm maybe related to this change? www.drupal.org/project/drupal/issues/994
17:59mstenta[m]Definitely has to do with #states and checkboxes in our form...
18:00paul121[m]Yeah. The last comment in that issue is prob it
18:01paul121[m] $(e.target).prop('checked', e.value).trigger('change');
18:01paul121[m] $(e.target).closest('.js-form-item, .js-form-wrapper').find('input').prop('checked', e.value).trigger('change');
18:01mstenta[m]Relevant line in our code: github.com/farmOS/farmOS/blob/a56fccaa8f
18:01paul121[m]This code change: git.drupalcode.org/project/drupal/-/comm
18:02paul121[m]ah: www.drupal.org/project/drupal/issues/294
18:02mstenta[m]ah ha
18:02paul121[m]wow, plain as day:
18:02paul121[m]> States on radios and checkboxes elements are currently broken until #994360: #states cannot check/uncheck checkboxes elements is resolved, but when that issue is fixed another appears.
18:03paul121[m]> what that issue is fixed another appears
18:03paul121[m]s/what/when/
18:04paul121[m]ugh so idk how we add those classes to the checkbox wrapper. not sure if we have access to that in our settings form?
18:04mstenta[m]i can run a quick test with the patch from that issue to see if it works (and still applies)
18:05mstenta[m]last updated in 2018 for drupal 8.7.x :-/
18:07mstenta[m]test started...
18:08mstenta[m]github.com/mstenta/farmOS/actions/runs/4
18:13paul121[m]hmm I'm inspecting a settings page now. It seems that the checkboxes do have the js-form-item class in their wrapper
18:13paul121[m]the issue might be that the "Install modules" button does not
18:14paul121[m]<paul121[m]> "This code change: git...." <- I dunno.. don't fully understand the JS states logic from just looking at this
18:23mstenta[m]The patch applied but did not fix our test
18:26paul121[m]wait have the tests completed?
18:28mstenta[m]Yea, sorry I re-ran failed tests - mariadb failed first, and have BOTH a failure due to the existing mariadb database connection issue BUT ALSO showed the same testInstallFunctionality failure as well
18:29paul121[m]dang
18:32paul121[m]Okay, yep
18:37paul121[m]When a module checkbox is clicked/checked, Drupal states logic should remove the `disabled` property from the "Install modules" button
18:41paul121[m]But that isn't happening because this change selects the "install modules" button itself (it has the `.js-form-submit` class), and then tries to find child `input` elements, however itself is the `input` element!
18:41paul121[m]git.drupalcode.org/project/drupal/-/comm
18:42paul121[m]so thus, no child input is found and disabled is never applied
18:43paul121[m]<paul121[m]> "When a module checkbox is..." <- Subtle detail: the inverse of this should happen when the page is loaded, so that is why `disabled` is never applied in the first place
18:43paul121[m] * so thus, no child input is found and disabled is never removed
18:45paul121[m]..... so I think this would be fixed if we can remove `.js-form-submit` from the "Install modules" input itself. removing a class is harder than adding :-/
18:49paul121[m]IMO release without updating Drupal core :-)
18:51paul121[m]Or, consider this as a pretty minor bug that doesn't have ill-consequences if the user clicks "install modules" without any selected. We could add form validation to give an error message
18:52paul121[m](side note - quite cool that our tests caught this!! :P)
19:26mstenta[m]Should we just remove the disabled state logic altogether from our form?
19:26paul121[m]thats an option too
19:26mstenta[m]It's a "nice to have"
19:26mstenta[m]But not worth spending time fixing this IMO
19:27paul121[m]Right. So we could remove code and maybe add back in later... or kinda let the bug live on? 🤷
19:27paul121[m]I guess we need to address the test error at minimum
19:28mstenta[m]Yea. I say we just remove the logic, don't disable the submit button, don't test that the submit button is disabled, and call it a day
19:28mstenta[m]Then someone in the future can try to redo it if they want... and run into this bug and try to fix it in the process
19:30mstenta[m]Maybe we also add a validateForm() that checks to make sure modules that are not installed were selected
19:32paul121[m]sounds good to me
19:32mstenta[m]k i'll throw together a PR right now...
19:33mstenta[m]> Maybe we also add a validateForm() that checks to make sure modules that are not installed were selected
19:33mstenta[m]actually, maybe this isn't necessary - submitForm() basically does this and bails early if none were selected
19:35mstenta[m]github.com/mstenta/farmOS/commit/fa45b8b
19:36mstenta[m]We don't need to do a full PR for this IMO - if the tests pass, and if you can just take a quick look at that commit paul121 ?
19:51paul121[m]a PR would actually be nice to find this code later on :-)
19:51mstenta[m]tests passed
19:51paul121[m]or update the changelog I guess
19:51mstenta[m]ok
19:52mstenta[m]does the commit look good, so i can just make the PR and immediately merge it?
19:53mstenta[m](signing off soon - would love to get 2.0.4 released before the end of the day, not sure what your availability to review is)
19:53paul121[m]Yes, looks good to me
19:53mstenta[m]cool!
19:53mstenta[m]i'll wrap it up in a PR as-is
19:53mstenta[m]thanks1`
19:53paul121[m]wow didn't realize the time already
19:53mstenta[m] * thanks!
20:46mstenta[m]farmOS 2.0.4 has been released! github.com/farmOS/farmOS/releases/2.0.4 🎉

< 022023-04-03⋏04 >