Skip to content
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

Range Field Has Unexpected Display with Missing Value #2044

Closed
neildaniels opened this issue Aug 28, 2019 · 1 comment

Comments

@neildaniels
Copy link
Contributor

commented Aug 28, 2019

Describe the bug
In the Panel, the range field surprised me with the way it handles having no value set (like if creating a new page without a default value, or adding the field to an existing page).

For example,

ratingValue:
  label: Rating Value
  type: range
  min: 0
  max: 5
  tooltip:
    after: ''
  width: 1/3

Looks like this when there's no saved value:
Screen Shot 2019-08-28 at 11 19 59 AM

Expected behavior
If 0 is part of the possible range of values, I would expect the range slider to appear to be positioned where 0 would be (but still display the - dash).

My rationale: I assume most uses of a range value involve ->toInt() or ->toFloat() and an empty value would mean it's returning 0 or 0.0. In the example above, it looks like the default value is "3".

However, if 0 isn't within the allowed range, then I suppose sticking the slider in the exact middle is as valid as any other place.

Regardless of placement: maybe the knob itself should be semi-transparent to indicate that it's not "really" set to the value at that spot.

Kirby Version
3.2.3

Desktop (please complete the following information):

  • OS: macOS 10.15 Beta (19A536g)
  • Safari 13.0 (15608.2.2)
@distantnative distantnative added this to the 3.2.5 milestone Sep 11, 2019
@distantnative distantnative self-assigned this Sep 11, 2019
distantnative added a commit that referenced this issue Sep 11, 2019
bastianallgeier added a commit that referenced this issue Sep 13, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2019

afbora added a commit to afbora/kirby that referenced this issue Sep 13, 2019
afbora added a commit to afbora/kirby that referenced this issue Sep 13, 2019
afbora added a commit to afbora/kirby that referenced this issue Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.