Custom Field module integration

Created on 9 March 2023, about 2 years ago
Updated 14 March 2023, about 2 years ago

Problem/Motivation

The Custom Field module ( https://www.drupal.org/project/custom_field β†’ ) is actively maintained.
It is an alternative to the Flexfield module, which hasn't seen a commit since November 2021.

Steps to reproduce

Not applicable.

Proposed resolution

Write a new Schema.org Blueprints Custom Field module.
It's possible that Schema.org Blueprints Flex Field would serve as a good starting point for this effort.

Notes

  • The goal is feature parity with flexfield.module
  • Use Recipe with Nutrition Information as the development example.
  • Track features or suggestions for the custom_field.module.
  • schemadotorg_custom_field.module should be marked as experimental
  • custom_field.module solution is similar to flexfield.module

Remaining tasks

  • Update MODULES.md and composer.libraries.json
  • Copy schemadotorg_flexfield.module and rename schemadotorg_custom_field.module
  • Update hook_schemadotorg_property_field_alter()
  • Confirm field storage configuration
  • Confirm field instance configuration
  • Confirm form display settings
  • Confirm view display settings
  • Update schemadotorg_flexfield_preprocess_flexfield()
  • Update schemadotorg_flexfield_schemadotorg_jsonld_schema_property_alter()
  • Add SchemaDotOrgCustomFieldManager service
  • Add basic test coverage for the manager service

User interface changes

Allow user to choose Custom Field fields in the Schema.org field mappings

API changes

Not applicable.

Data model changes

Unknown at this time.

Steps to manually review

  • Create a clean installation with the schemadotorg_custom_field.module enabled
  • Create a Recipe entity type.
    /admin/structure/types/schemadotorg?type=Recipe
  • Confirm that 'nutrition' is using a 'Custom field'
    /admin/structure/types/manage/recipe/fields
  • Review 'nutrition' field storage.
    /admin/structure/types/manage/recipe/fields/node.recipe.schema_nutrition/storage
  • Review 'nutrition' field instance.
    /admin/structure/types/manage/recipe/fields/node.recipe.schema_nutrition
  • Review form display.
    /admin/structure/types/manage/recipe/form-display
  • Review views display.
    /admin/structure/types/manage/recipe/display
  • Create a Recipe node.
    /node/add/recipe
  • Confirm units are added to the node edit form
  • Confirm units are added to node view
  • Confirm JSON-LD includes units
✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States agileadam Maine, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024