-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix #20944: Updating UI Slider number properties to accept decimal values #20945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix #20944: Updating UI Slider number properties to accept decimal values #20945
Conversation
…o accept decimal values
|
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:
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 🤖 🙂 |
There was a problem hiding this 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
#parseIntto#parseNumberfor 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 |
...raco.Web.UI.Client/src/packages/property-editors/slider/property-editor-ui-slider.element.ts
Outdated
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/manifests.ts
Show resolved
Hide resolved
| description: '', | ||
| propertyEditorUiAlias: 'Umb.PropertyEditorUi.Integer', | ||
| propertyEditorUiAlias: 'Umb.PropertyEditorUi.Decimal', | ||
| config: [{ alias: 'step', value: '0.001' }], |
There was a problem hiding this comment.
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)
Prerequisites
This fixes issue #20944
Description
I updated the Slider UI properties to use

Umb.PropertyEditorUi.Decimaland provided a default step value to allow for decimal numeric values. I also renamed#parseIntto#parseNumberfor readability (similar to what was done in #18233).To recreate:
This item has been added to our backlog AB#62542