Skip to content

Fix #20944: Updating UI Slider number properties to accept decimal values#20945

Merged
engijlr merged 8 commits intoumbraco:mainfrom
jsandrae:v16/allow-decimals-in-slider-properties
Dec 15, 2025
Merged

Fix #20944: Updating UI Slider number properties to accept decimal values#20945
engijlr merged 8 commits intoumbraco:mainfrom
jsandrae:v16/allow-decimals-in-slider-properties

Conversation

@jsandrae
Copy link
Contributor

@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 🤖 🙂

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
Copy link
Contributor

@engijlr engijlr left a comment

Choose a reason for hiding this comment

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

Everything looks good! I tested it out and it works fine. I adjusted the step value to 0.00001 to cover more use cases. Well done! 👍

@engijlr engijlr enabled auto-merge (squash) December 15, 2025 08:52
@engijlr engijlr merged commit fa23e18 into umbraco:main Dec 15, 2025
28 checks passed
nielslyngsoe added a commit that referenced this pull request Dec 15, 2025
…lues (#20945)

* updating UI slider properties min, max, initial1, initial2 and step to accept decimal values

* Changes based on Copilot suggestions

* Used a smaller step value configuration.

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
nielslyngsoe added a commit that referenced this pull request Dec 15, 2025
* block context example

* fix clone method

* implement contextual variant id

* use contextual variant id

* ensure currentExposeOf uses elementType configuration

* make hasExposeOf use ElementType configuration for variatId

* Update src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* rename to displayVariant

* use variantid in this case

* update readme

* return false

* remove unused imports

* return undefined

* append UmbWorkspaceViewElement interface

* remove test

* fallback to false

* fallback to false

* refactor what is not exposed.

* Fix #20944: Updating UI Slider number properties to accept decimal values (#20945)

* updating UI slider properties min, max, initial1, initial2 and step to accept decimal values

* Changes based on Copilot suggestions

* Used a smaller step value configuration.

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>

* Manifests: Fix misnaming and mis-registering of the document validation manifest (closes #21128) (#21139)

Fix misnaming and mis-registering of the document validation manifest.

* Performance: Optimize memory footprint of document URL cache (closes #21055) (#21066)

* Optimize memory footprint of document URL cache.

* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/DocumentUrlServiceTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Used properties, added some further comments.

* Fixed failing integration tests.

* Ensure no edge case exists where the culture code to language Id map isn't up to date with the newly created languages.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Block List: Sort mode (#21060)

* Block List: added sort-mode

* Fix missing closing bracket

* register sort mode toolbar element on start up

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts

* Update nightly build to include 16 as 17 is now main (#21144)

* Global search items missing Umbraco url segment (#20266)

* Add /umbraco url Segament for searched mapped results to aviod 404 og navigation away from backoffice

* Applied changes from code review.

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>

* import

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jason Andrae <jasona@emergentsoftware.net>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk>
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend release/17.1.0 state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants