-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat(ui5-range-slider): Add Range Slider component #2310
Conversation
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.
Niki, Thanks for the PR.
I tried it briefly and I looked at the code, it works fine to me and conceptually I don't find major things.
The way you apply styles to the DOM element is something that you should refactor. We do it more declaratively so to say, compared to the imperative approach you have. You will find more details in the inlined comment.
Regarding the API, I would say we should discuss the "value" and "endValue' thing within the team, otherwise it seems fine.
Hey Ilhan, Thank you for your comments and kind feedback. Just want to say I am working on the range selection concept (with the endValue prop) at the moment and it is not yet functional. I will write an update when I have progress later, in order to have something like an implementation example (..proof of concept) when discussing the property. Overall the PR is still in an early, draft stage, the CSS is there for now just to visualise the POC samples, the code will be also changed and refactored frequently. |
I separated the Slider and Range Slider functionality and introduced a new common base class - SliderBase. |
Feature Request: #1242 |
…leaning, some more comments fixes
- startValue and endValue are swapped when the start-handle moves pass the end-handle - when click is within the selected range no values are changed - if the selected range is dragged - both values are updated and the whole selection is moved - Implemented property synchronizations and normalizations - Added RTL support and resize handling for the Range Slider elements - Added test page, tests, and samples - Added support by specifications for Fiori 3, Fiori 3 Dark, Fiori 3 HCW and HCB variants and Belize variants
359db57
to
6fd6e7c
Compare
Hello, I rebased this PR based on the Slider's branch. Current progress overview:
|
Hi colleagues, everything we discussed about the Slider's implementation is now adapted and applied here to the Range Slider and it is ready to be reviewed again. This PR is based on the Slider's one, the only additional files are RangeSlider.js, the playground sample, the test page and the unit tests for it. |
62c49bf
to
68bfb3f
Compare
Introduce ui5-range-slider component that represents a numerical interval and two handles to select a sub-range within it.
The purpose of the component is to enable visual selection of sub-ranges within a given interval.
<ui5-range-slider start-value="10" end-value="20"></ui5-range-slider>
Overview
ui5-range-slider
extends theSliderBase
base class. It contains most of the component's API as well as it's CSS and the core part of the template file:Properties:
min
- The minimum value of the slider rangemax
- The maximum value of the slider rangevalue
- The current value of the sliderstep
- Determines the increments in which the slider will moveshowTickmarks
- Displays a visual divider between the step valuesshowToolTip
- Determines if a tooltip should be displayed above the handlelabelInterval
- Labels some or all of the tickmarks with their values.disabled
- Defines whether theSlider
is in disabled state.Events:
change
- Fired when the value changes and the user has finished interacting with the slider.input
- Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.ui5-range-slider
extends the API above with its specific properties:startValue
- Defines start point of a selection - position of a first handle on the slider.endValue
- Defines end point of a selection - position of a second handle on the slider.Main features:
The Range Slider allows users to:
startValue
orendValue
by clicking on the RangeSlider progress tracker or moving the handles.startValue
andendValue
properties are always kept within the boundaries of themin
andmax
they are synchronized between each other, along with their visual UI representation.