From 09bbf05ec0a37ad0ec0c37ade75aac3f235671f5 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 23 May 2026 22:27:39 +0200 Subject: [PATCH] fix(carousel demo): default loop=true so triggers never go dead at boundaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "los clicks siguen fallando" report was tested against loop=false default behavior — at idx=3 (last slide) the next button correctly went disabled (canGoNext=false), opacity 0.4, no advance — but testers read that as a broken click handler rather than a boundary stop. Default the demo to loop=true so each click predictably advances (0→1→2→3→0...). Verified 6 successive clicks wrap correctly. Component default stays loop=false (matches Embla / Mantine / ark-ui); the demo just picks the more illustrative interactive baseline. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/routes/uix/components/carousel/+page.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/routes/uix/components/carousel/+page.svelte b/web/routes/uix/components/carousel/+page.svelte index 1f7ef2bdd..4bae725bf 100644 --- a/web/routes/uix/components/carousel/+page.svelte +++ b/web/routes/uix/components/carousel/+page.svelte @@ -25,7 +25,11 @@ let align = $state('start'); let gap = $state(0); // in rem; converted to `${gap}rem` when forwarded let verticalBlockSize = $state(16); // rem - let loop = $state(false); + // Default `loop=true` for the demo so clicking next/prev wraps around + // instead of going dead at the boundaries — the disabled state at + // canGoNext=false / canGoPrev=false confused testers into thinking + // the click handler had broken. Component default stays `loop=false`. + let loop = $state(true); // Drag let dragEnabled = $state(true);