Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: convert a lot of style tags to class tags with tailwind #597

Merged
merged 1 commit into from
Dec 22, 2023
Merged
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
2 changes: 1 addition & 1 deletion frontend/src/lib/components/chart/ChartHomeBlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
>
<div class="flex w-full items-center justify-between">
<div class="mr-3 min-w-[24px]">
<Icon style="outline:none" tag="svg" viewBox="0 0 24 24">
<Icon tag="svg" viewBox="0 0 24 24">
<path fill="black" d={iconMap[chart.type]} />
</Icon>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
outerDivClass="!w-full !border-grey-light !py-1 !bg-white"
liActiveOptionClass="!bg-primary-light"
>
<p style="text-wrap: pretty;" slot="selected" let:option>{option.label}</p>
<p class="text-pretty" slot="selected" let:option>{option.label}</p>
</MultiSelect>
{/if}
<div class="ml-auto flex items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
outerDivClass="!w-full !border-grey-light !py-1 !bg-white"
liActiveOptionClass="!bg-primary-light"
>
<p style="text-wrap: pretty;" slot="selected" let:option>{option}</p>
<p class="text-pretty" slot="selected" let:option>{option}</p>
</MultiSelect>
{/if}
<div class="ml-auto flex items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
outerDivClass="!w-full !border-grey-light !py-1 !bg-white"
liActiveOptionClass="!bg-primary-light"
>
<p style="text-wrap: pretty;" slot="selected" let:option>{option.label}</p>
<p class="text-pretty;" slot="selected" let:option>{option.label}</p>
</MultiSelect>
{/if}
<div class="ml-auto flex items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
export let slices: Slice[];
</script>

<Row style="overflow: visible">
<Row class="overflow-visible">
<!-- y cell -->
<Cell>
{#if parameters.yChannel === SlicesOrModels.SLICES}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/general/HeaderIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use:tooltip={{ text: tooltipContent }}
>
<div class="h-6 w-6 fill-grey">
<Icon style="outline:none" tag="svg" viewBox="0 0 24 24">
<Icon tag="svg" viewBox="0 0 24 24">
<path
class={`${$page.url.href.includes(pageName) ? 'fill-primary' : 'fill-grey'}`}
d={icon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export let sortModel: string;
</script>

<div style="display: flex; align-items:center;">
<div class="flex items-center">
<div>
<div>{header ? header : 'difference'}</div>
<div class="font-normal text-grey-dark">{$comparisonColumn?.name}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
text: 'Interactive distributions for metadata columns. Click or drag on the histograms to filter the data'
}}
>
<Icon style="outline:none" tag="svg" viewBox="-6 -6 36 36">
<Icon tag="svg" viewBox="-6 -6 36 36">
<path d={mdiInformationOutline} />
</Icon>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/metadata/SliceHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
text: 'Slices are named combinations of filters'
}}
>
<Icon style="outline:none" tag="svg" viewBox="-6 -6 36 36">
<Icon tag="svg" viewBox="-6 -6 36 36">
<path d={mdiInformationOutline} />
</Icon>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
{#if hovering}
<IconButton
size="button"
style="padding: 0px"
on:click={(e) => {
e.stopPropagation();
showOptions = !showOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<svelte:window on:keydown={submit} />

<div class="mb-2.5 ml-5 mt-2.5 flex items-center justify-between">
<span style="display: inline-block;">
<span class="inline-block">
<SliceDetails predicateGroup={slice.filterPredicates} />
</span>
<div style="display: flex; align-items: center;">
<div class="flex items-center">
<span style="margin-right: 10px; margin-left: 10px">
{metric}
</span>
Expand Down Expand Up @@ -95,7 +95,7 @@
on:keydown={submit}
>
<Paper elevation={7}>
<Content style="display:flex; flex-direction:column">
<Content class="flex flex-col">
<Textfield bind:value={newSliceName} label="Slice Name" bind:this={input} />
<div class="mt-2.5">
<Button
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/lib/components/popups/CopyProjectPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content style="display: flex; flex-direction: column; width: 800px;">
<Content class="flex w-[800px] flex-col">
<h2 class="mb-4 text-xl">Copy Project</h2>
<div class="mb-12 flex flex-col">
{#if step === 1}
Expand Down Expand Up @@ -92,11 +92,9 @@
</div>
{/if}
<div class="flex items-center self-end">
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}
>Cancel</Button
>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button
style="margin-left: 5px;"
class="ml-2"
variant="outlined"
disabled={invalidName}
on:click={() => copyProject()}>{'Copy'}</Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content style="display: flex; flex-direction: column; width: 400px;">
<Content class="flex w-[400px] flex-col">
<h2 class="mb-4 text-xl">Feature Flags</h2>
{#each Object.keys($featureFlags).filter( (key) => Object.keys(zenoFeatureFlags).includes(key) ) as flag}
<div class="flex items-center">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/popups/FilterGroupEntry.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
/>
{/if}
{#if index > -1}
<IconButton on:click={deletePredicate} style="min-width: 60px; color: var(--G2)">
<IconButton on:click={deletePredicate} class="min-w-[60px] text-grey-dark">
<Icon tag="svg" viewBox="0 0 24 24">
<path fill="currentColor" d={mdiTrashCanOutline} />
</Icon>
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/lib/components/popups/FolderPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@
<svelte:window on:keydown={submit} />

<Popup on:close>
<Content style="display: flex; align-items: center;">
<Content class="flex items-end">
<Textfield bind:value={folderName} label="Folder Name" bind:this={input} />
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}>
Cancel
</Button>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button
style="margin-left: 5px;"
class="ml-2"
variant="outlined"
disabled={invalidName}
on:click={() => (folderToEdit ? editFolder() : createFolder())}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content style="display: flex; align-items: center;">
<Content class="flex items-center">
<Textfield bind:value={organizationName} label="Organization Name" bind:this={input} />
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}>
Cancel
</Button>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button
style="margin-left: 5px;"
class="ml-2"
variant="outlined"
on:click={() =>
zenoClient
Expand Down
13 changes: 3 additions & 10 deletions frontend/src/lib/components/popups/NewReportPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,10 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content style="display: flex; align-items: center;">
<Content class="flex items-center">
<Textfield bind:value={reportName} label="Report Name" bind:this={input} />
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}>
Cancel
</Button>
<Button
style="margin-left: 5px;"
variant="outlined"
disabled={invalidName}
on:click={addReport}
>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button class="ml-2" variant="outlined" disabled={invalidName} on:click={addReport}>
Create
</Button>
</Content>
Expand Down
12 changes: 5 additions & 7 deletions frontend/src/lib/components/popups/OrganizationPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content style="display: flex; flex-direction: column;">
<Content class="flex flex-col">
<h2>Organization Settings</h2>
<div class="mb-5 flex flex-col">
<Textfield bind:value={organizationToEdit.name} label="Name" bind:this={input} />
Expand All @@ -66,9 +66,9 @@
<thead
class="sticky left-0 top-0 border-b border-grey-lighter bg-background pb-1 font-semibold"
>
<th style="width: 200px;">Email</th>
<th class="w-[200px]">Email</th>
<th>Admin</th>
<th style="width: auto;" />
<th class="w-auto" />
</thead>
<tbody>
{#each members as member}
Expand Down Expand Up @@ -128,11 +128,9 @@
{/await}
</div>
<div class="flex items-center self-end">
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}
>Cancel</Button
>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button
style="margin-left: 5px;"
class="ml-2"
variant="outlined"
disabled={invalidName}
on:click={() => updateOrganization()}>{'Update'}</Button
Expand Down
30 changes: 8 additions & 22 deletions frontend/src/lib/components/popups/ProjectPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,23 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content
style="display: flex; flex-direction: column; width: 800px; max-height: 80vh; overflow-y: scroll"
>
<Content class="flex max-h-[80vh] w-[800px] flex-col overflow-y-auto">
<h2 class="mb-4 text-xl">Project Settings</h2>
<!--Project Settings-->
<h3 class="text-lg">Settings</h3>
<div class="mb-12 flex flex-col">
<div class="mb-6 flex">
<div class="mr-8 flex w-1/2 flex-col">
<div>
<Textfield
bind:value={config.name}
label="Name"
bind:this={input}
style="width: 100%;"
/>
<Textfield bind:value={config.name} label="Name" bind:this={input} class="w-full" />
</div>
<div>
<Textfield
bind:value={config.samplesPerPage}
label="Number of displayed items"
bind:this={input}
type="number"
style="width: 100%;"
class="w-full"
/>
</div>
</div>
Expand All @@ -111,12 +104,7 @@
</div>
</div>
<div>
<Textfield
textarea
bind:value={config.description}
label="Description"
style="width: 100%"
/>
<Textfield textarea bind:value={config.description} label="Description" class="w-full" />
</div>
<!--Visibility Settings-->
<div class="mb-5 mt-12 flex flex-col" transition:fade>
Expand Down Expand Up @@ -159,7 +147,7 @@
disabled={member.id === user.id}
/>
</td>
<td style="text-align: end;">
<td class="text-end">
{#if member.id !== user.id}
<IconButton
on:click={() =>
Expand Down Expand Up @@ -233,7 +221,7 @@
)}
/>
</td>
<td style="text-align: end;">
<td class="text-end">
<IconButton
on:click={() =>
zenoClient
Expand Down Expand Up @@ -268,11 +256,9 @@
{/if}
{/await}
<div class="flex items-center self-end">
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}
>Cancel</Button
>
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button
style="margin-left: 5px;"
class="ml-2"
variant="outlined"
disabled={invalidName}
on:click={() => updateProject()}>{'Update'}</Button
Expand Down
21 changes: 7 additions & 14 deletions frontend/src/lib/components/popups/ReportPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@

<svelte:window on:keydown={submit} />
<Popup on:close>
<Content
style="display: flex; flex-direction: column; width: 800px; max-height: 80vh; overflow-y: scroll"
>
<Content class="flex max-h-[80vh] w-[800px] flex-col overflow-y-auto">
<h2 class="mb-4 text-xl">Report Settings</h2>
<h3 class="text-lg">Settings</h3>
<div class="mb-12 flex flex-col">
Expand All @@ -102,7 +100,7 @@
<span>Updated: {new Date(report.updatedAt ?? '').toLocaleString()}</span>
</div>
</div>
<Textfield textarea bind:value={report.description} label="Description" style="width: 100%" />
<Textfield textarea bind:value={report.description} label="Description" class="w-full" />
</div>
<div class="mb-5 flex flex-col" transition:fade>
<h3 class="mb-2 text-lg">Collaborators</h3>
Expand Down Expand Up @@ -142,7 +140,7 @@
disabled={member.id === user.id}
/>
</td>
<td style="text-align: end;">
<td class="text-end">
{#if member.id !== user.id}
<IconButton
on:click={() =>
Expand Down Expand Up @@ -209,7 +207,7 @@
)}
/>
</td>
<td style="text-align: end;">
<td class="text-end">
<IconButton
on:click={() =>
zenoClient
Expand Down Expand Up @@ -240,14 +238,9 @@
{/if}
</div>
<div class="flex items-center self-end">
<Button style="margin-left: 10px;" variant="outlined" on:click={() => dispatch('close')}
>Cancel</Button
>
<Button
style="margin-left: 5px;"
variant="outlined"
disabled={invalidName}
on:click={() => updateReport()}>{'Update'}</Button
<Button class="ml-4" variant="outlined" on:click={() => dispatch('close')}>Cancel</Button>
<Button class="ml-2" variant="outlined" disabled={invalidName} on:click={() => updateReport()}
>{'Update'}</Button
>
</div>
</Content>
Expand Down
Loading
Loading