From 9ee7ed0faa7fb825574ee44829e43bb8887dcd93 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 30 Jun 2026 20:38:32 +0000
Subject: [PATCH] feat: improve profile search field UX and accessibility
- Hide trailing clear icon when search is empty to remove focusable element
- Update aria-label to 'clear search' for better screen reader context
- Reset domainsFiltered when search is empty
- Fix return value in fuzzy matcher
Co-authored-by: yeboster <23556525+yeboster@users.noreply.github.com>
---
.jules/palette.md | 4 ++++
.prettierignore | 5 +++++
src/routes/profile/+page.svelte | 18 +++++++++++-------
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/.jules/palette.md b/.jules/palette.md
index 00f41cdf..949eaf2c 100644
--- a/.jules/palette.md
+++ b/.jules/palette.md
@@ -1,3 +1,7 @@
## 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.
+## 2024-10-25 - Trailing Icons in SMUI Textfields
+
+**Learning:** When conditionally rendering a trailing icon inside an SMUI `Textfield` component, the `withTrailingIcon` prop must dynamically match the conditional rendering of the icon slot itself. If `withTrailingIcon` is persistently true while the icon is conditionally removed, it creates accessibility and layout issues. Additionally, an empty trailing icon button should be completely removed from the DOM to prevent screen readers and keyboard users from focusing on an inactive element.
+**Action:** Always bind the `withTrailingIcon` property to the same condition used to render the trailing icon slot (e.g., `withTrailingIcon={search !== ''}` and `{#if search !== ''}`).
diff --git a/.prettierignore b/.prettierignore
index 38972655..f80bd7e7 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -11,3 +11,8 @@ node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock
+test-results
+playwright-report
+.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}