Refactor stats component

Created on 29 October 2024, 24 days ago

Problem/Motivation

Using props in this component is causing too many issues with template logic, and forcing less-than-optimal workarounds.

Steps to reproduce

Create a stat list or any component with a stat. Leave the fields blank and hit save. The surrounding markup we'd want to exclude from rendering gets rendered anyway bc SDCs won't permit a null value, and even if you force it with a mixed "type" property, it doesn't allow for using simple intuitive template variable checks.

Proposed resolution

Pull the props out of the stat sdc. Refactor the case study preprocess function and get all of the steps that are forcing field values, and forcing non-empty arrays, so when there are no stats in the component's content, it won't break anything, _and_ won't print unwanted markup.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States spicy.werewolf

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

Comments & Activities

Production build 0.71.5 2024