ampproject / ampproject/amphtml

option to disable smooth scrolling in carousel

Open
#40,206 1 comment 0 reactions 0 assignees View on GitHub
Type: Feature Request
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Carousels should expose the [smoothScroll parameter](https://github.com/ampproject/amphtml/blob/c3940a0a90663270e8c244d0e82fb3d67958ad34/extensions/amp-base-carousel/0.1/carousel.js#L468C3-L468C12) in the constructor, so that developers who want to disable smooth scrolling transitions between slides can do so.

### Alternatives Considered

There are no viable alternatives, as the CSS 'scroll-behavior' is not allowed in AMP emails.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in extensions/amp-base-carousel/0.1/carousel.js at the constructor and the linked smoothScroll parameter. Trace how carousel instances receive options and how slide transitions use that setting. Done means developers can disable smooth scrolling through the constructor, including for AMP emails where CSS scroll-behavior is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.