Skip to content

[TASK] Implement "Render Options" UI for Deprecated Custom Fields #34804

@adrianjm-dotCMS

Description

@adrianjm-dotCMS

Description

Currently, users of the New Edit Content Beta must manually inject a JSON string into the "Field Variables" tab to fix rendering issues for "Deprecated" custom fields. This task involves replacing that manual process with a native UI section in the Overview tab.

The goal is to provide a "Render Options" section that automatically maps user selections to the customFieldOptions field variable in the background.

Technical Requirements:

  • Visibility Logic: The "Render Options" section should only be visible when the "Deprecated" implementation card is selected.
  • UI Components: * A selection group (Radio Buttons preferred, but with flexibility for a Toggle) to choose between "Display Inline" and "Show as Modal".
    • "Display Inline" (Default): No extra configuration required.
    • "Show as Modal": When selected, reveal two input fields for Width and Height.
  • Data Mapping: * Upon saving, the system must overwrite the customFieldOptions key in the Field Variables tab.
    • Example JSON structure to generate: {"showAsModal":true, "width":"398px", "height":"400px"}.
    • If "Display Inline" is selected, the showAsModal property should be set to false or the object cleared based on existing backend logic.

Acceptance Criteria

  • Conditional Rendering: The "Render Options" UI section appears only when the "Deprecated" implementation is active.
  • Selection Logic: Selecting "Show as Modal" reveals the Width and Height input fields; selecting "Display Inline" hides them.
  • Helper Text: Include the following description for the modal option: "Displays this field in a dialog. If off, the field will display inline but might not render correctly."
  • Background Sync: Saving the UI configuration correctly updates/overwrites the customFieldOptions variable in the Field Variables tab with the corresponding JSON object.
  • Persistence: Ensure that if a user returns to the Field Variables tab, they can see the generated JSON reflecting their UI choices.

Priority

None

Additional Context

Aditional Note: This is the dialog we have to apply those changes The idea is: Put render option below the implementation section

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Next 2-4 Sprints

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions