Type Score: Optimize Prefix & Suffix behavoir

Created on 5 April 2023, over 1 year ago
Updated 8 March 2024, 8 months ago

Problem/Motivation

If the score type is circle (verly likely also on the other types) and the max-value is hidden, the prefix will be printed out after the current-value.

So this is definitely wrong, the other question is: Should the prefix printed out twice, if the current-value AND max-value are shown?

Update: We've discussed this, with the result, that we should add separate prefix & suffix fields for the current value and the max value. This way, we have the maximum flexibility.

Steps to reproduce

Pick some values and set the following score display settings:

Proposed resolution

  1. @anybody: Add further pre- & suffix fields:
    1. paragraph.field_score_max_prefix (similar to field_score_prefix)
    2. paragraph.field_score_max_suffix (similar to field_score_suffix)
  2. @thomas.frobieter
    1. Add the new fields as data attributes
    2. Add the new data attributes to the javascript
    3. Probably fix the CSS

Another thing we should consider, is to move the markup to the Twig template. But this could be hard to accomplish, because of the various display variants we have. However.. we should check this out - in a seperate task (@thomas.frobieter).

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024