From 559af973a2ef739de85f752c8241a81b78feff4a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 20:07:14 +0000 Subject: [PATCH] UX: Make profile domain search reset properly and fix clear icon accessibility Co-authored-by: yeboster <23556525+yeboster@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ .prettierignore | 4 ++++ src/routes/profile/+page.svelte | 18 +++++++++++------- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index d6d129bc..61c877f3 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -2,3 +2,7 @@ **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. + +## 2024-11-20 - Clear Search Icon Accessibility and Reactivity +**Learning:** When conditionally rendering a trailing icon like a clear button in SMUI Textfield, the icon must not be focusable when empty. Also, when filtering a Svelte store based on input, ensure an 'else' block resets the data when the search becomes empty. +**Action:** Conditionally render the icon and bind `withTrailingIcon` to the same condition, use a descriptive aria-label, and ensure reactive filter statements have an else fallback. diff --git a/.prettierignore b/.prettierignore index 38972655..276ee0d2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,3 +11,7 @@ node_modules pnpm-lock.yaml package-lock.json yarn.lock + +.Jules/ +.jules/ +static/ diff --git a/src/routes/profile/+page.svelte b/src/routes/profile/+page.svelte index 7f290736..391ccfc6 100644 --- a/src/routes/profile/+page.svelte +++ b/src/routes/profile/+page.svelte @@ -17,6 +17,8 @@ $: if (search !== '') { domainsFiltered = domains.filter((domain) => isFuzzyMatch(domain.name, search)); + } else { + domainsFiltered = domains; } walletAddress.subscribe(async (address) => { @@ -39,7 +41,7 @@ if (trimmedDomain.startsWith(trimmedSearch) || trimmedDomain.includes(trimmedSearch)) return true; - else false; + else return false; } @@ -55,14 +57,16 @@ label="Search" bind:value={search} variant="outlined" - withTrailingIcon + withTrailingIcon={search !== ''} > -
- - - -
+ {#if search !== ''} +
+ + + +
+ {/if}