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.
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
src/Umbraco.Web.UI.Client/src/packages/property-editors/slider/manifests.ts
Outdated
Show resolved
Hide resolved
engijlr
left a comment
There was a problem hiding this comment.
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! 👍
…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>
* 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>
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