diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..d6d129b --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,4 @@ +## 2024-10-24 - Persisting Error State in Async Buttons + +**Learning:** Async buttons that handle errors often fail to reset their error state on subsequent attempts. This leads to a confusing UX where a successful retry still displays the error icon, making the user believe the action failed again. +**Action:** Always ensure that error flags (e.g., `hasError`) are reset at the _start_ of the async operation, not just set in the `catch` block. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42adb44..301e978 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: 'npm' + directory: '/' schedule: - interval: "weekly" + interval: 'weekly' diff --git a/.jules/bolt.md b/.jules/bolt.md new file mode 100644 index 0000000..14b815e --- /dev/null +++ b/.jules/bolt.md @@ -0,0 +1,10 @@ +# Bolt's Journal + +## 2024-05-22 - Async Race Conditions + +**Learning:** Asynchronous typeahead searches must implement a request ID mechanism. Without it, stale responses can overwrite newer ones, leading to correct search terms displaying incorrect results. +**Action:** Always use a request ID or cancellation token pattern when implementing async search/filter operations. + +## 2024-10-24 - [Svelte Search Optimization] +**Learning:** Using `on:keyup` for search inputs misses paste/drag events and triggers on navigation keys. Reactive statements `$: if (val !== null) debounce()` are superior for covering all input methods and reducing unnecessary calls. +**Action:** Prefer reactive statements over `on:keyup` for input-driven side effects. diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 0000000..00f41cd --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-10-24 - Accessible Icon Props and Loading Button State +**Learning:** Svelte wrapper components (like `Icon.svelte`) must spread `$$restProps` to allow passing accessibility attributes (e.g., `aria-label`) from parent components. Without this, icons remain inaccessible to screen readers. Also, persistent "Success" states on buttons can be confusing; auto-resetting them after a timeout improves clarity. +**Action:** Always include `{...$$restProps}` in wrapper components and implement auto-reset logic for temporary success states in interactive elements. diff --git a/src/components/DomainPayment.svelte b/src/components/DomainPayment.svelte index ac131ee..e04970d 100644 --- a/src/components/DomainPayment.svelte +++ b/src/components/DomainPayment.svelte @@ -102,7 +102,11 @@

{domainName}

- addYears(-1)} disabled={years === 1 || feesApproved} aria-label="remove-year"> + addYears(-1)} + disabled={years === 1 || feesApproved} + aria-label="remove-year" + > {years} {yearsLabel} @@ -111,7 +115,7 @@
-
+

Payment token