az-digital / az_quickstart

UArizona's web content management system built with Drupal 10.
https://quickstart.arizona.edu
GNU General Public License v2.0
30 stars 20 forks source link

Determine feasibility of adopting #config_target in ConfigFormBase for Enhanced Configuration Handling in Drupal 10.2 #3011

Open trackleft opened 10 months ago

trackleft commented 10 months ago

Motivation

Updating the codebase to utilize Drupal's #config_target in ConfigFormBase, following Drupal.org issue #3373502. This aims to simplify form configuration interactions, improve validation, and reduce redundant code.

Is your feature request related to a problem? Please describe.

Current form handling in modules is verbose and prone to errors, requiring manual configuration value handling.

Proposed Resolution

Describe the solution you'd like

Implement #config_target in forms extending ConfigFormBase to directly link form fields to configuration items, simplifying submission and validation.

Describe alternatives you've considered

Maintaining the current method of manually managing configuration values in form submissions.

Roles and Permissions considerations

Additional context

Adopting this feature aligns with Drupal 10's best practices, improving maintainability and developer experience.

Forms Using ConfigFormBase in AZ Quickstart

trackleft commented 9 months ago

It looks like we should be able to follow similar steps to what were implemented here: https://git.drupalcode.org/project/drupal/-/merge_requests/5223/diffs