Allow decimal values for the Score Paragraph bundle

Created on 16 August 2023, over 1 year ago
Updated 8 March 2024, 10 months ago

Problem/Motivation

Currently its not possible to configure a Score Paragraph to count decimals, so if you have something like 1.5 billion, the "1.5" is rounded to the next full integer.

Steps to reproduce

Proposed resolution

Add a setting to let the user choose count steps:
- Full numbers (x)
- First Decimal (0,x)
- Second Decimal (0,0x)

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @thomas.frobieter
  • Assigned to thomas.frobieter
  • 🇩🇪Germany Anybody Porta Westfalica

    @thomas.frobieter we should do this now in https://www.drupal.org/project/drowl_paragraphs_bs before the release, so we don't have to make expensive config updates etc.!

  • @anybody, nope, this is not a field type issue, this is an JS issue:

  • 🇩🇪Germany Anybody Porta Westfalica

    @thomas.frobieter I thought it might also be config related because of:

    Add a setting to let the user choose count steps:
    - Full numbers (x)
    - First Decimal (0,x)
    - Second Decimal (0,0x)

    see issue summary.

    But well, I think the paragraph type is an edge case in general... so I wouldn't see priority here?

  • Oh, so maybe a simple text field with some JS validation would be a good choice here?

    Or we need another field to let the user choose the frontend decimal delimiter.

  • 🇩🇪Germany Anybody Porta Westfalica

    Yeah I also thought about this and I'm unsure... Especially because the final level for decision is not PHP, but the JS library, as we'll typically pass an integer?

    So I guess a text field will only bring further problems, a settings might be the better choice or the formatter... because I guess typically it might be global.

    But this is such an edge-case, I think we should leave this as-is until we run into this.

  • Status changed to Postponed 10 months ago
  • I agree, let's postpone this.

Production build 0.71.5 2024