guardian/dotcom-rendering

Apply gradient to top and bottom of clue list when scrollable

Aperta

#13.543 aperta il 5 mar 2025

 (0 commenti) (0 reazioni) (0 assegnatari)TypeScript (35 fork)auto 404
Pick me upcrosswordsgood first issue

Metriche repository

Star
 (271 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Currently we apply a gradient to the bottom of the clue list when there are more clues that are hidden and can be scrolled into view, but don't apply the same treatment to the top of the list to show it can be scrolled in the other direction.

We could also replace the debounce on the scroll and resize events so the visibility of the gradient changes whilst still scrolling rather than waiting until stopped. It uses debouncing rather than throttling as lodash.debounce is already a dependency in DCR — we could add lodash.throttle (or similar), or roll our own.

Guida contributor