Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

chore(Carousel): the wheel listener's comment says when it reads layout (#10281)

Christopher Chedeau28dda9399f01
diff --git a/.changeset/carousel-wheel-comment.md b/.changeset/carousel-wheel-comment.md
new file mode 100644
index 0000000000..bdecf8d1e1
--- /dev/null
+++ b/.changeset/carousel-wheel-comment.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[chore] Internal: a source comment in `Carousel` now says that the wheel listener reads no style or layout unless a flick holds the row. Apps see no change.
+
+@vjeux
diff --git a/packages/core/src/Carousel/Carousel.tsx b/packages/core/src/Carousel/Carousel.tsx
index a8401df4b8..2f281eb6b6 100644
--- a/packages/core/src/Carousel/Carousel.tsx
+++ b/packages/core/src/Carousel/Carousel.tsx
@@ -462,8 +462,8 @@ export function Carousel({
// A mouse wheel gives only deltaY. Shift + wheel is the convention for a
// horizontal scroll. A trackpad gives deltaX, so the browser scrolls the row.
// A row that fits gets no listener, so a page scroll over it does not wait
- // for script. The listener reads no style or layout. Only a held row's move
- // reads the row's direction.
+ // for script. The listener reads no style or layout unless a flick holds
+ // the row.
useAttachment(
scrollElRef,
el => {