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
core(Slider): showBoundaries should be independent from showTicks #5740
Conversation
PF4 preview: https://patternfly-react-pr-5740.surge.sh |
@mcarrano do we want to show ticks for the min max labels? |
@tlabaj I don't feel strongly about whether we need ticks at either end of the slider when displaying boundary values. I think that it's OK without them. However, I do think that the last example: is a bit odd because I generally expect to see tick marks to reflect the intervals on a discrete slider. @KKoukiou is there a specific reason why you need/want this change for Cockpit? |
@mcarrano thanks for the quick answer. Here is a current dialog that uses sliders in cockpit, not PF4 yet. There are around 10000 points there, showing ticks does not make sense. However I still want to show the boundaries. |
Are these examples discrete or continuous sliders @KKoukiou . If they are continuous, then I agree that tick marks at either end are not needed. If they are discrete sliders, shouldn't we always have the tick marks to indicate slider steps? I think this example makes sense: But I question whether this one is needed: |
@mcarrano the step in our examples is always
|
@mcarrano so actualy the first usage scenario I sent (VM memory) has min value != 0, so it's not complying with the continuous variant as far as I understand. |
I didn't think that the continuous example required the min value to be 0, but perhaps I'm mistaken. I guess the difference between a slider with a step value = 1 and a continuous slider is that the later can return a fractional value, but maybe we don't need both. What are your thoughts @tlabaj ? If someone wants a slider that can only return whole number values, what you you expect them to use? In any case, I am fine with the essence of this PR. I just want to make sure that the examples are reflecting the way we want people to use this. |
@mcarrano @tlabaj the continuous slider as seen in the example code takes values [0, 100], so there are essentially 100 continuous points. In my use case I have arbitary values with min > 0 and max > 100. It can be [128, 512] the min max limits. The step I need is one, but I can't see how i can use the continuous slider here. And I don't want to show 512-128 = 384 ticks. |
Can't the min and max values for the continuous slider be set to anything @tlabaj ? |
@mcarrano @KKoukiou in case where you have custom steps, the |
I'm fine with whatever seems to work best here. Regarding your original question, no I don't think it's necessary to show tick marks for the min and max values @tlabaj . |
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.
Looks good to me.
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.
@KKoukiou if you address this latest comment, I can merge this :) |
Ups sorry , missed your previous ping @nicolethoen :) |
Add examples for the valid combinations. Closes patternfly#5739
Add examples for the valid combinations.
Closes #5739