[23:54:42] | <paul121[m]> | hmm symbioquine I forgot about the package.json files in the farmOS-map `/examples` directory |
[23:55:36] | <paul121[m]> | we just got some dependabot PRs #149 #150 and #151 to update some deps in those: https://github.com/farmOS/farmOS-map/pull/149 |
[23:56:56] | <paul121[m]> | is there an easy way to update all of those together? I assume they have many of the same dependencies? |
[01:10:58] | <symbioquine[m]> | Similar dependencies, yes |
[01:11:31] | <symbioquine[m]> | <paul121[m]> "is there an easy way to update..." <- I've got to get to bed, but I think the answer is probably somewhere in here: https://github.com/lerna/lerna/issues/1663 |
[12:09:29] | <paul121[m]> | <symbioquine[m]> "I've got to get to bed, but I..." <- awesome! `lerna exec npm audit fix` did the trick |
[12:10:04] | <paul121[m]> | this cascaded into a slew of additional dependabot prs... needed to run`npm audit fix` directly in the `/examples` directory as well |
[12:12:23] | <paul121[m]> | maybe we should configure dependabot to ignore the `/examples` directory if this gets out of hand 😅 |
[15:08:08] | <MarcosCarballal[> | https://github.com/farmOS/farmOS/blob/2.x/modules/core/field/src/FarmFie... |
[15:08:08] | <MarcosCarballal[> | Hi all, I am trying to use the farmFieldFactory to define a new asset type. |
[15:08:08] | <MarcosCarballal[> | Am I crazy in saying that there is no "number" type here for specifying the type of fields? I can't seem to get a float or integer as a field type through this method. |
[15:09:59] | <mstenta[m]> | Marcos Carballal: you're not crazy - that class has a `fraction` field type available, but in order to use other numeric Drupal field types you'll need to build the field definition yourself |
[15:10:19] | <paul121[m]> | Here is an example of building a `decimal` bundle field on assets: https://github.com/Vital-Agronomics/farm_asset_area/blob/main/farm_asset... |
[15:10:24] | <mstenta[m]> | fwiw, Fraction fields can store decimal values - they just split them into two integer fields, for maximum precision (numerator and denominator) |
[15:10:41] | <mstenta[m]> | (hidden from the end user... still "feels" like a decimal) |
[15:11:10] | <mstenta[m]> | FYI here is the list of Drupal core field types: https://www.drupal.org/docs/drupal-apis/entity-api/fieldtypes-fieldwidge... |
[15:12:14] | <mstenta[m]> | the `fraction` field type comes from this contrib module (not Drupal core): https://www.drupal.org/project/fraction/ |
[15:15:17] | <MarcosCarballal[> | Ah great, so I can take the field output of `$this->farmFieldFactory->bundleFieldDefinition($options);` and then just manually call the setDisplaySettings with the values I need? |
[15:16:12] | <mstenta[m]> | yes you can do that to override `FarmFieldFactory` defaults |
[15:17:00] | <MarcosCarballal[> | Great thanks! |
[15:17:06] | <mstenta[m]> | paul121's example above is a good example of bypassing `FarmFieldFactory` entirely - that is what it *noramally* looks like creating a Drupal field definition |
[15:17:25] | <mstenta[m]> | s/*noramally*/_normally_/ |
[15:18:09] | <mstenta[m]> | `FarmFieldFactory` is just a helper to create the same things, but provides some farmOS-specific opinions for certain types of fields we use a lot in core asset/logs types :-) |