ampproject / ampproject/amphtml

amp-story-interactive-slider variant for expressing opinion relative to a central/neutral position

Open
#39,493 2 comments 0 reactions 0 assignees View on GitHub
P3: When Possible Type: Feature Request WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

I would like to suggest a slider component that is designed to represent opinion on a `-100 > 0 > 100` or `-50 > 0 > 50` scale.
There are many questions/topics which fit on this scale e.g. (political left/right).

I think it needs two key features:

1) Configure where on the scale the slider starts i.e. in the middle.
2) Do not increase the size of the emoji/percentage towards the right hand end of the scale, but instead increase the further you are from the center/default start position.

### Alternatives Considered

The slider component is clearly designed for a scale of `0 > 100`, rather than `-100 > 0 > 100`.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by examining the amp-story-interactive-slider component and its existing 0–100 behavior. Trace how the initial slider position and emoji/percentage sizing are configured. Done means the component can represent a negative-to-positive scale with a configurable neutral starting position and scales visual feedback by distance from that neutral point.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.