Skip to content

Commit 2cb2cc5

Browse files
committed
AI feedback
1 parent b5a9ac1 commit 2cb2cc5

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

frontend/viewer/src/lib/components/field-editors/select.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@
126126
<CommandEmpty>{emptyResultsPlaceholder ?? $t`No items found`}</CommandEmpty>
127127
<CommandGroup>
128128
{#if nullOption}
129+
{@const selected = value === undefined || value === null}
129130
<CommandItem
130131
keywords={[nullOption]}
131132
onSelect={() => selectValue(undefined)}
132133
class="group max-md:h-12 text-muted-foreground"
133134
data-value-index={-1}
134135
aria-label={nullOption}
135136
>
136-
<Icon icon="i-mdi-check" class={cn('md:hidden', value === null || 'invisible')} />
137+
<Icon icon="i-mdi-check" class={cn('md:hidden', selected || 'invisible')} />
137138
{nullOption}
138139
</CommandItem>
139140
{/if}

frontend/viewer/src/lib/components/ui/switch/switch.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
bind:checked
2121
class={cn(
2222
'focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
23-
label || className,
23+
!!label || className,
2424
)}
2525
{...restProps}
2626
>

frontend/viewer/src/project/browse/filter/FieldSelect.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts" module>
2+
import type {WritingSystemSelection} from '$lib/writing-system-service.svelte';
3+
24
export type SelectedField = {
35
id: string;
46
ws: WritingSystemSelection;
@@ -10,7 +12,6 @@
1012
import {t} from 'svelte-i18n-lingui';
1113
import {pt} from '$lib/views/view-text';
1214
import {useCurrentView} from '$lib/views/view-service';
13-
import type {WritingSystemSelection} from '$lib/writing-system-service.svelte';
1415
1516
let {value = $bindable()}: { value: SelectedField | null } = $props();
1617

frontend/viewer/src/project/browse/filter/SemanticDomainSelect.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<script lang="ts" module>
2+
import type {WritingSystemSelection} from '$lib/writing-system-service.svelte';
3+
24
export type SelectedField = {
35
id: string;
46
ws: WritingSystemSelection;
57
}
68
</script>
79
810
<script lang="ts">
9-
import {useWritingSystemService, type WritingSystemSelection} from '$lib/writing-system-service.svelte';
11+
import {useWritingSystemService} from '$lib/writing-system-service.svelte';
1012
import {useSemanticDomains} from '$lib/semantic-domains';
1113
import type {ISemanticDomain} from '$lib/dotnet-types';
1214
import {Select} from '$lib/components/field-editors';

0 commit comments

Comments
 (0)