[MGNLUI-8414] Required slider field doesn't accept min value Created: 02/Oct/23  Updated: 12/Oct/23

Status: Accepted
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.14
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Brano Sandala Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: Improve Slider Field
Team: Nucleus

 Description   

Steps to reproduce

  1. Open https://nightly.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/tours/apps/tours.yaml:edit
  2.  Configure required slider field:
      detail:
        form:
          properties:
            name:
              i18n: true
            slider:
              $type: sliderField 
              required: true
    
    
  1. Save changes
  2. Open https://nightly.magnolia-cms.com/.magnolia/admincentral#app:tours:detail;/:add
  3. Fill in required fields (name, image)
  4. Touch the slider but choose the min value in the end.
  5. Click "Save changes"

Expected results

User can pick the min value (unless the documentation explicitly mentions that https://docs.magnolia-cms.com/product-docs/6.2/Developing/Templating/Dialog-definition/Field-definition/List-of-fields/Slider-field.html#_field_specific_properties).

Actual results

"This field is required" in the slider field

Workaround

Set the min value one step below the real accepted minum value.

Development notes

The  current impl considers the empty value as equal min value. https://git.magnolia-cms.com/projects/PLATFORM/repos/ui.pub/browse/magnolia-ui-framework/src/main/java/info/magnolia/ui/field/SliderField.java#153.

Tip: How textField with com.vaadin.data.converter.StringToDoubleConverter handles the empty value?

 


Generated at Mon Feb 12 09:54:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.