[PP-2] Improve handling of radios in Redux-integrated field widgets

Created on 6 January 2025, 3 months ago

Overview

✨ Save page data form values in application state with support for undo/redo Active introduced handling radios, but it had done so with a fragile implementation using a function named `getNameAttributeBasedOnId()` (see `ui/src/components/form/formUtil.ts`). Let's improve this, but preferably after πŸ“Œ [PP-1] Extend test coverage for page data form elements Postponed is done.

Proposed resolution

Suggested by @larowlan:

  1. Override template_preprocess_radios in the XB module;
  2. Put $variables['element']['#name'] into $variables['attributes']['data-name'];
  3. Refactor the JS to pluck data-name if there's no name attribute β€” see where getNameAttributeBasedOnId() is used to find out where this needs to happen.
πŸ“Œ Task
Status

Postponed

Version

0.0

Component

Redux-integrated field widgets

Created by

πŸ‡³πŸ‡±Netherlands balintbrews Amsterdam, NL

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

Comments & Activities

Production build 0.71.5 2024