ui: ESLint config updates (#27700)
* chore: Spacing between sibling elements in html markup * chore: Formatting and linting rules
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script module lang="ts">
|
||||
<script lang="ts" module>
|
||||
import { Copy } from '@lucide/svelte';
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import ActionIcon from '$lib/components/app/actions/ActionIcon.svelte';
|
||||
@@ -29,6 +29,7 @@
|
||||
>
|
||||
<div>
|
||||
<button type="button">before</button>
|
||||
<ActionIcon icon={Copy} tooltip="Copy" onclick={() => {}} />
|
||||
|
||||
<ActionIcon icon={Copy} onclick={() => {}} tooltip="Copy" />
|
||||
</div>
|
||||
</Story>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script module lang="ts">
|
||||
<script lang="ts" module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import ChatMessageStatistics from '$lib/components/app/chat/ChatMessages/ChatMessageStatistics/ChatMessageStatistics.svelte';
|
||||
import { expect } from 'storybook/test';
|
||||
@@ -14,7 +14,6 @@
|
||||
</script>
|
||||
|
||||
<Story
|
||||
name="ViewButtonsSingleTabStop"
|
||||
args={{
|
||||
agenticTimings: {
|
||||
llm: { predicted_ms: 1000, predicted_n: 200, prompt_ms: 500, prompt_n: 100 },
|
||||
@@ -29,6 +28,7 @@
|
||||
promptMs: 500,
|
||||
promptTokens: 100
|
||||
}}
|
||||
name="ViewButtonsSingleTabStop"
|
||||
play={async ({ canvas, userEvent }) => {
|
||||
const reading = await canvas.findByRole('button', { name: 'Reading' });
|
||||
const generation = await canvas.findByRole('button', { name: 'Generation' });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script module lang="ts">
|
||||
<script lang="ts" module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import ChatScreenForm from '$lib/components/app/chat/ChatScreen/ChatScreenForm.svelte';
|
||||
import { ATTACHMENT_TOOLTIP_TEXT } from '$lib/constants';
|
||||
@@ -15,8 +15,8 @@
|
||||
</script>
|
||||
|
||||
<Story
|
||||
name="AddButtonSingleTabStop"
|
||||
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
|
||||
name="AddButtonSingleTabStop"
|
||||
play={async ({ canvas, userEvent }) => {
|
||||
const textarea = await canvas.findByRole('textbox');
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
/>
|
||||
|
||||
<Story
|
||||
name="AddDropdownFocusesFirstEnabled"
|
||||
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
|
||||
name="AddDropdownFocusesFirstEnabled"
|
||||
play={async ({ canvas, userEvent }) => {
|
||||
const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT });
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script module lang="ts">
|
||||
<script lang="ts" module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import { ScrollCarousel } from '$lib/components/app';
|
||||
import { ScrollCarouselVariant } from '$lib/enums';
|
||||
@@ -34,10 +34,13 @@
|
||||
>
|
||||
<div>
|
||||
<button type="button">before</button>
|
||||
|
||||
<ScrollCarousel class="w-96" variant={ScrollCarouselVariant.CENTER}>
|
||||
<div class="h-12 w-12 shrink-0 bg-muted"></div>
|
||||
|
||||
<div class="h-12 w-12 shrink-0 bg-muted"></div>
|
||||
</ScrollCarousel>
|
||||
|
||||
<button type="button">after</button>
|
||||
</div>
|
||||
</Story>
|
||||
@@ -61,6 +64,7 @@
|
||||
>
|
||||
<div>
|
||||
<button type="button">before</button>
|
||||
|
||||
<ScrollCarousel class="w-48" variant={ScrollCarouselVariant.CENTER}>
|
||||
{#each [...Array(20).keys()] as i (i)}
|
||||
<div class="h-12 w-24 shrink-0 bg-muted">{i}</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script module lang="ts">
|
||||
<script lang="ts" module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import SidebarNavigationConversationItem from '$lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte';
|
||||
import { expect } from 'storybook/test';
|
||||
@@ -22,8 +22,8 @@
|
||||
</script>
|
||||
|
||||
<Story
|
||||
name="ForkIconSingleTabStop"
|
||||
args={{ conversation: mockForkedConversation, depth: 1 }}
|
||||
name="ForkIconSingleTabStop"
|
||||
play={async ({ canvas, userEvent }) => {
|
||||
const row = await canvas.findByRole('button', { name: /Forked Conversation/ });
|
||||
const forkIcon = await canvas.findByRole('link');
|
||||
|
||||
Reference in New Issue
Block a user