Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -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 !== ''}`).
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock
test-results
playwright-report
.jules
.Jules
static/
18 changes: 11 additions & 7 deletions src/routes/profile/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

$: if (search !== '') {
domainsFiltered = domains.filter((domain) => isFuzzyMatch(domain.name, search));
} else {
domainsFiltered = domains;
}

walletAddress.subscribe(async (address) => {
Expand All @@ -39,7 +41,7 @@

if (trimmedDomain.startsWith(trimmedSearch) || trimmedDomain.includes(trimmedSearch))
return true;
else false;
else return false;
}
</script>

Expand All @@ -55,14 +57,16 @@
label="Search"
bind:value={search}
variant="outlined"
withTrailingIcon
withTrailingIcon={search !== ''}
>
<svelte:fragment slot="trailingIcon">
<div class="close-icon">
<IconButton on:click={cleanSearch} aria-label="cancel">
<Icon icon="cancel" />
</IconButton>
</div>
{#if search !== ''}
<div class="close-icon">
<IconButton on:click={cleanSearch} aria-label="clear search">
<Icon icon="cancel" />
</IconButton>
</div>
{/if}
</svelte:fragment>
</Textfield>
<DomainsTable domains={domainsFiltered} {loaded} />
Expand Down