Skip to content

Conversation

@jsandrae
Copy link

@jsandrae jsandrae commented Nov 24, 2025

Prerequisites

  • [x ] I have added steps to test this contribution in the description below

This fixes issue #20944

Description

I updated the Slider UI properties to use Umb.PropertyEditorUi.Decimal and provided a default step value to allow for decimal numeric values. I also renamed #parseInt to #parseNumber for readability (similar to what was done in #18233).
image

To recreate:

  1. Edit a document type to add a default Slider
  2. For any of the numerical inputs (min, max, initial1, inital2 or step), add a add a decimal value
  3. Save the new property with given values

This item has been added to our backlog AB#62542

Copilot AI review requested due to automatic review settings November 24, 2025 18:16
@github-actions
Copy link

Hi there @jsandrae, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

Copilot finished reviewing on behalf of jsandrae November 24, 2025 18:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Slider property editor to support decimal values by changing the configuration UI from Umb.PropertyEditorUi.Integer to Umb.PropertyEditorUi.Decimal. The implementation includes renaming the parsing method for clarity and updating manifest configurations to support decimal precision.

Key changes:

  • Changed property editor UI from Integer to Decimal for all slider configuration properties (min, max, initial values, step)
  • Renamed #parseInt to #parseNumber for better semantic clarity
  • Added step configuration (0.001) to all decimal property editor UIs

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/property-editor-ui-slider.element.ts Renamed parsing method from #parseInt to #parseNumber for semantic clarity
src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/manifests.ts Updated property editor UI aliases to Decimal and added step configurations; changed default values to decimal notation
src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/Umbraco.Slider.ts Updated min/max property editor UI aliases to Decimal with step configurations

@jsandrae jsandrae changed the title updating UI slider properties min, max, initial1, initial2 and step t… Fix #20944: Updating UI Slider number properties to accept decimal values Nov 24, 2025
@nielslyngsoe nielslyngsoe added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Nov 26, 2025
description: '',
propertyEditorUiAlias: 'Umb.PropertyEditorUi.Integer',
propertyEditorUiAlias: 'Umb.PropertyEditorUi.Decimal',
config: [{ alias: 'step', value: '0.001' }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR. But is it safe to assume that having 3 decimals is enough to cover all cases?
I'm not sure, but I will leave this thought up for those reviewing( or something with oppinions coming by)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants