fix: from QA

This commit is contained in:
Arman committed 2023-03-27 11:53:19 +02:00
1 parent be2510ce10
commit b38e267417
7 files changed
+57 -37

No files matched your search

+9 -2
View File
@@ -15,6 +15,7 @@
import { preferences } from '$lib/stores/preferences';
import { onMount } from 'svelte';
import { View } from '$lib/helpers/load';
import { tooltip } from '$lib/actions/tooltip';
export let columns: Writable<Column[]>;
export let view: View;
@@ -108,7 +109,10 @@
class="toggle-button-element"
aria-label="List View"
type="button"
class:is-selected={view === View.Table}>
class:is-selected={view === View.Table}
use:tooltip={{
content: 'Column View'
}}>
<span class="icon-view-list" aria-hidden="true" />
</a>
</li>
@@ -119,7 +123,10 @@
class="toggle-button-element"
aria-label="Grid View"
type="button"
class:is-selected={view === View.Grid}>
class:is-selected={view === View.Grid}
use:tooltip={{
content: 'Grid View'
}}>
<span class="icon-view-grid" aria-hidden="true" />
</a>
</li>
+5 -1
View File
@@ -1,7 +1,11 @@
<script lang="ts">
export let isCommonSection = false;
export let gap = 24;
</script>
<ul class="form-list" class:common-section={isCommonSection}>
<ul
class="form-list"
class:common-section={isCommonSection}
style={`--form-list-gap: ${gap / 16}rem;`}>
<slot />
</ul>
+1 -1
View File
@@ -52,7 +52,7 @@
<span
class:icon-info={icon === 'info'}
class:icon-exclamation={icon === 'exclamation'}
class="u-cross-center u-margin-block-start-2 u-line-height-1 u-icon-small"
class="u-cross-center u-line-height-1 u-icon-small u-color-text-gray"
aria-hidden="true" />
<span class="text u-line-height-1-5">
Allowed characters: alphanumeric, non-leading hyphen, underscore, period
@@ -5,6 +5,7 @@
export let id: string;
export let label: string;
export let name: string = 'elements';
export let optionalText: string | undefined = undefined;
export let showLabel = true;
export let placeholder = '';
@@ -144,7 +145,7 @@
</li>
{:else}
<li class="drop-list-item">
<span class="text">There are no documents that match your search</span>
<span class="text">There are no {name} that match your search</span>
</li>
{/each}
</svelte:fragment>
@@ -135,7 +135,9 @@
</script>
<li>
<ul class="grid-box" style="--p-grid-item-size:16em; --p-grid-item-size-small-screens:16rem;">
<ul
class="grid-box"
style="--p-grid-item-size:16em; --p-grid-item-size-small-screens:16rem; --grid-gap: 0.5rem;">
<li>
<LabelCard name="relationship" bind:group={way} value="one">
<svelte:fragment slot="title">One-way relationship</svelte:fragment>
@@ -154,6 +156,7 @@
<InputSelectSearch
id="related"
label="Related Collection"
name="collections"
bind:search
bind:value={data.related}
required
@@ -41,6 +41,7 @@
{label}
{optionalText}
required={attribute.required}
name="collections"
bind:value
options={collectionList?.collections?.map((n) => ({ value: n.$id, label: n.name })) ??
[]} />
@@ -4,7 +4,7 @@
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { CardGrid, Heading } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button, Form, InputSelectSearch, InputText } from '$lib/elements/forms';
import { Button, Form, FormList, InputSelectSearch, InputText } from '$lib/elements/forms';
import { difference } from '$lib/helpers/array';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
@@ -66,36 +66,40 @@
</p>
<svelte:fragment slot="aside">
<ul class="form-list">
<InputText
id="id"
label="Document ID"
showLabel={false}
placeholder="Document ID"
readonly />
{#if displayNames?.length}
{#each displayNames as name, i}
<div class="u-flex u-gap-16">
<InputSelectSearch
id={name}
label={name}
showLabel={false}
placeholder="Select attribute"
bind:value={displayNames[i]}
{options} />
<div class="form-item-part u-cross-child-end">
<Button
text
on:click={() => {
displayNames.splice(i, 1);
displayNames = displayNames;
}}>
<span class="icon-x" aria-hidden="true" />
</Button>
<div class="u-flex u-flex-vertical u-gap-8">
<FormList>
<InputText
id="id"
label="Document ID"
showLabel={false}
placeholder="Document ID"
readonly />
{#if displayNames?.length}
{#each displayNames as name, i}
<div class="u-flex u-gap-8">
<InputSelectSearch
id={name}
label={name}
showLabel={false}
placeholder="Select attribute"
bind:value={displayNames[i]}
name="attributes"
{options} />
<div class="form-item-part u-cross-child-end">
<Button
text
noMargin
on:click={() => {
displayNames.splice(i, 1);
displayNames = displayNames;
}}>
<span class="icon-x" aria-hidden="true" />
</Button>
</div>
</div>
</div>
{/each}
{/if}
{/each}
{/if}
</FormList>
<Button
noMargin
text
@@ -107,7 +111,7 @@
<span class="icon-plus" aria-hidden="true" />
<span class="text">Add attribute</span>
</Button>
</ul>
</div>
</svelte:fragment>
<svelte:fragment slot="actions">