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

Slider value expressivity and style options #636

Open
codementum opened this issue Feb 21, 2025 · 0 comments
Open

Slider value expressivity and style options #636

codementum opened this issue Feb 21, 2025 · 0 comments

Comments

@codementum
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Image

In this example, it would be helpful to:

Style

  1. control slider width to make it "thinner"
  2. (less critical) change text lightness on the labels to be a bit darker

Technical

  1. Note the value 2 in the tooltip above 0.2-- currently matching 0.1 to 1, 0.2 to 2, etc. was the only way to get the ticks to select. When we put value as 0.2 instead of 2, it would skip to the 0 or 1.

Describe the solution you'd like

Slider config options, either options in the config itself or some style string? Whatever is easiest.

Describe alternatives you've considered

Other option would be a custom component.

Additional context

Current slider config ->

"understanding_test_2": {
      "type": "markdown",
      "path": "motivated-scatterplot-1b/assets/understanding_test_2.md",
      "nextButtonText": "Next",
      "response": [
        {
          "id": "correlationQuestion",
          "prompt": "How correlated do you think the data looks?\n\n",
          "required": true,
          "type": "slider",
          "options": [
            {
              "label": "0",
              "value": 0
            },
            {
              "label": "0.1",
              "value": 1
            },
            {
              "label": "0.2",
              "value": 2
            },
            {
              "label": "0.3",
              "value": 3
            },
            {
              "label": "0.4",
              "value": 4
            },
            {
              "label": "0.5",
              "value": 5
            },
            {
              "label": "0.6",
              "value": 6
            },
            {
              "label": "0.7",
              "value": 7
            },
            {
              "label": "0.8",
              "value": 8
            },
            {
              "label": "0.9",
              "value": 9
            },
            {
              "label": "1",
              "value": 10
            }
          ]
        }
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant