diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml
index 82743d9d6..998810120 100644
--- a/.github/workflows/chromatic.yml
+++ b/.github/workflows/chromatic.yml
@@ -24,6 +24,7 @@ on:
env:
PUBLIC_ENV: production
+ NODE_ENV: production
jobs:
chromatic-deployment:
@@ -43,7 +44,7 @@ jobs:
- run: npm run sync
- run: npm run build
- name: Publish to Chromatic
- uses: chromaui/action@v1
+ uses: chromaui/action@v16.6.3
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitOnceUploaded: true
diff --git a/src/lib/components/accounts/Mailkey.svelte b/src/lib/components/accounts/Mailkey.svelte
index b48db42b0..8a174e0b2 100644
--- a/src/lib/components/accounts/Mailkey.svelte
+++ b/src/lib/components/accounts/Mailkey.svelte
@@ -68,10 +68,10 @@
{/if}
-
diff --git a/src/lib/components/accounts/Unverified.svelte b/src/lib/components/accounts/Unverified.svelte
index a8e8e3bc8..4e69789f3 100644
--- a/src/lib/components/accounts/Unverified.svelte
+++ b/src/lib/components/accounts/Unverified.svelte
@@ -51,7 +51,7 @@ a user who is logged in but has `verified_journalist = false`.
-
+ {#snippet icon()}{/snippet}
diff --git a/src/lib/components/forms/ChangeOwner.svelte b/src/lib/components/forms/ChangeOwner.svelte
index 859f3ba82..3f6793444 100644
--- a/src/lib/components/forms/ChangeOwner.svelte
+++ b/src/lib/components/forms/ChangeOwner.svelte
@@ -176,13 +176,13 @@ Change owner of one or more documents.
-
+ {#snippet icon()}{/snippet}
{$_("change_owner.continue", { values: { n: count } })}
{#snippet oversize()}
-
+ {#snippet icon()}{/snippet}
{$_("change_owner.toomany", { values: { n: MAX_EDIT_BATCH } })}
{/snippet}
@@ -235,7 +235,7 @@ Change owner of one or more documents.
{$_("change_owner.confirm")}
- onclose?.()}>
+ onclose?.()}>
{$_("change_owner.cancel")}
diff --git a/src/lib/components/forms/ConfirmDelete.svelte b/src/lib/components/forms/ConfirmDelete.svelte
index ab9814cc8..5c5e5e16c 100644
--- a/src/lib/components/forms/ConfirmDelete.svelte
+++ b/src/lib/components/forms/ConfirmDelete.svelte
@@ -90,7 +90,7 @@ Confirm deletion or one or more documents.
{#snippet oversize()}
-
+ {#snippet icon()}{/snippet}
{$_("delete.toomany", { values: { n: MAX_EDIT_BATCH } })}
{/snippet}
@@ -113,7 +113,7 @@ Confirm deletion or one or more documents.
{$_("delete.confirm")}
- onclose?.()}>
+ onclose?.()}>
{$_("delete.cancel")}
diff --git a/src/lib/components/forms/ConfirmRedaction.svelte b/src/lib/components/forms/ConfirmRedaction.svelte
index 54a4e81d6..1e8ca699d 100644
--- a/src/lib/components/forms/ConfirmRedaction.svelte
+++ b/src/lib/components/forms/ConfirmRedaction.svelte
@@ -81,7 +81,7 @@ This almost certainly lives in a modal.
{$_("redact.confirm")}
- dispatch("close")}>
+ dispatch("close")}>
{$_("redact.cancel")}
diff --git a/src/lib/components/forms/DeleteProject.svelte b/src/lib/components/forms/DeleteProject.svelte
index 829bff000..7156365ca 100644
--- a/src/lib/components/forms/DeleteProject.svelte
+++ b/src/lib/components/forms/DeleteProject.svelte
@@ -28,7 +28,7 @@ Confirm project deletion.
{$_("delete.confirm")}
- dispatch("close")}>
+ dispatch("close")}>
{$_("delete.cancel")}
diff --git a/src/lib/components/forms/Edit.svelte b/src/lib/components/forms/Edit.svelte
index 12c3da4d0..b89cdaf9c 100644
--- a/src/lib/components/forms/Edit.svelte
+++ b/src/lib/components/forms/Edit.svelte
@@ -91,7 +91,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{#if error}
-
+ {#snippet icon()}{/snippet}
{error.message}
{#if Object.keys(error.errors ?? {}).length}
@@ -164,7 +164,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{$_("edit.save")}
- onclose?.()}>
+ onclose?.()}>
{$_("edit.cancel")}
diff --git a/src/lib/components/forms/EditAccess.svelte b/src/lib/components/forms/EditAccess.svelte
index 36003bb9b..e97404705 100644
--- a/src/lib/components/forms/EditAccess.svelte
+++ b/src/lib/components/forms/EditAccess.svelte
@@ -86,7 +86,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{#if error}
-
+ {#snippet icon()}{/snippet}
{error.message}
{#if Object.keys(error.errors ?? {}).length}
@@ -132,7 +132,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
>
{$_("edit.save")}
- onclose?.()}>
+ onclose?.()}>
{$_("edit.cancel")}
diff --git a/src/lib/components/forms/EditDataMany.svelte b/src/lib/components/forms/EditDataMany.svelte
index 62f2566bc..40a37a531 100644
--- a/src/lib/components/forms/EditDataMany.svelte
+++ b/src/lib/components/forms/EditDataMany.svelte
@@ -213,13 +213,13 @@ This will mostly merge with existing data.
@@ -307,7 +307,7 @@ This will mostly merge with existing data.
/>
- {$_("dialog.done")}
+ {$_("dialog.done")}
{#if total_edited > 0}
{$_("data.total_edited", { values: { n: total_edited } })}
diff --git a/src/lib/components/forms/EditMany.svelte b/src/lib/components/forms/EditMany.svelte
index dfb3ebfcc..d632d299f 100644
--- a/src/lib/components/forms/EditMany.svelte
+++ b/src/lib/components/forms/EditMany.svelte
@@ -88,13 +88,13 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{#snippet empty()}
-
+ {#snippet icon()}{/snippet}
{$_("edit.nodocs")}
{/snippet}
{#snippet oversize()}
-
+ {#snippet icon()}{/snippet}
{$_("edit.toomany", { values: { n: MAX_EDIT_BATCH } })}
{/snippet}
@@ -102,7 +102,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{#if error}
-
+ {#snippet icon()}{/snippet}
{error.message}
{#if Object.keys(error.errors ?? {}).length}
@@ -154,7 +154,7 @@ Usually this will be rendered inside a modal, but it doesn't have to be.
{$_("edit.save")}
- onclose?.()}>
+ onclose?.()}>
{$_("edit.cancel")}
diff --git a/src/lib/components/forms/EditNote.svelte b/src/lib/components/forms/EditNote.svelte
index 5fd6bb974..09cae66ad 100644
--- a/src/lib/components/forms/EditNote.svelte
+++ b/src/lib/components/forms/EditNote.svelte
@@ -75,7 +75,7 @@ Positioning and generating coordinates should happen outside of this form.
{$_("annotate.save")}
- dispatch("close")}
+ dispatch("close")}
>{$_("annotate.cancel")}
diff --git a/src/lib/components/forms/EditProject.svelte b/src/lib/components/forms/EditProject.svelte
index d2a52d768..477431c63 100644
--- a/src/lib/components/forms/EditProject.svelte
+++ b/src/lib/components/forms/EditProject.svelte
@@ -71,7 +71,7 @@ Edit project metadata
{$_("projects.create")}
{/if}
- dispatch("close")}>
+ dispatch("close")}>
{$_("edit.cancel")}
diff --git a/src/lib/components/forms/EditSectionRow.svelte b/src/lib/components/forms/EditSectionRow.svelte
index 4cfab307f..f035c80ca 100644
--- a/src/lib/components/forms/EditSectionRow.svelte
+++ b/src/lib/components/forms/EditSectionRow.svelte
@@ -71,7 +71,7 @@ One row of the `EditSections.svelte` form, to encapsulate logic.
name="action"
value="update"
{disabled}
- on:click={async () => {
+ onclick={async () => {
const section = { id, page_number, title };
await update(document.id, id, section, csrftoken);
await invalidate(`document:${document.id}`);
@@ -86,7 +86,7 @@ One row of the `EditSections.svelte` form, to encapsulate logic.
minW={false}
name="action"
value="delete"
- on:click={async () => {
+ onclick={async () => {
await remove(document.id, id, csrftoken);
await invalidate(`document:${document.id}`);
}}
@@ -102,7 +102,7 @@ One row of the `EditSections.svelte` form, to encapsulate logic.
name="action"
value="add"
{disabled}
- on:click={async (e) => {
+ onclick={async (e) => {
await create(document.id, { title, page_number }, csrftoken);
await invalidate(`document:${document.id}`);
reset();
@@ -116,7 +116,7 @@ One row of the `EditSections.svelte` form, to encapsulate logic.
mode="primary"
title={$_("sections.clear")}
minW={false}
- on:click={reset}
+ onclick={reset}
>
diff --git a/src/lib/components/forms/EditSections.svelte b/src/lib/components/forms/EditSections.svelte
index 5eac54b45..0985dd90f 100644
--- a/src/lib/components/forms/EditSections.svelte
+++ b/src/lib/components/forms/EditSections.svelte
@@ -83,7 +83,7 @@ This form is entirely client-side.
diff --git a/src/lib/components/forms/InviteCollaborator.svelte b/src/lib/components/forms/InviteCollaborator.svelte
index 73883438b..c8858c67e 100644
--- a/src/lib/components/forms/InviteCollaborator.svelte
+++ b/src/lib/components/forms/InviteCollaborator.svelte
@@ -64,7 +64,7 @@ Invite a new collaborator to a project
{$_("collaborators.add")}
- dispatch("close")}>{$_("dialog.cancel")}
+ dispatch("close")}>{$_("dialog.cancel")}
diff --git a/src/lib/components/forms/Projects.svelte b/src/lib/components/forms/Projects.svelte
index 480415fc2..4785e8edd 100644
--- a/src/lib/components/forms/Projects.svelte
+++ b/src/lib/components/forms/Projects.svelte
@@ -106,13 +106,13 @@ and we don't want to do that everywhere.
{#snippet empty()}
-
+ {#snippet icon()}{/snippet}
{$_("edit.nodocs")}
{/snippet}
{#snippet oversize()}
-
+ {#snippet icon()}{/snippet}
{$_("edit.toomany", { values: { n: MAX_EDIT_BATCH } })}
{/snippet}
@@ -136,7 +136,7 @@ and we don't want to do that everywhere.
{/each}
diff --git a/src/lib/components/forms/RemoveCollaborator.svelte b/src/lib/components/forms/RemoveCollaborator.svelte
index 1b9664ba9..55217e3df 100644
--- a/src/lib/components/forms/RemoveCollaborator.svelte
+++ b/src/lib/components/forms/RemoveCollaborator.svelte
@@ -48,7 +48,7 @@ Remove a collaborator from a project
{$_("dialog.remove")}
- dispatch("close")}>{$_("dialog.cancel")}
+ dispatch("close")}>{$_("dialog.cancel")}
diff --git a/src/lib/components/forms/Reprocess.svelte b/src/lib/components/forms/Reprocess.svelte
index 5fa197148..1ae344e57 100644
--- a/src/lib/components/forms/Reprocess.svelte
+++ b/src/lib/components/forms/Reprocess.svelte
@@ -158,7 +158,7 @@ This will mostly be used inside a modal but isn't dependent on one.
{/if}
{#if errors}
-
+ {#snippet icon()}{/snippet}
{errors.message}
{#if errors.errors}
@@ -172,7 +172,7 @@ This will mostly be used inside a modal but isn't dependent on one.
{#if pending.length > 0}
-
+ {#snippet icon()}{/snippet}
{$_("dialogReprocessDialog.pending")}
{#each pending as document}
@@ -184,7 +184,7 @@ This will mostly be used inside a modal but isn't dependent on one.
{#if multilingual}
-
+ {#snippet icon()}{/snippet}
{$_("dialogReprocessDialog.multilingual")}
{/if}
@@ -224,7 +224,7 @@ This will mostly be used inside a modal but isn't dependent on one.
{#snippet oversize()}
-
+ {#snippet icon()}{/snippet}
{$_("dialogReprocessDialog.toomany", {
values: { max: MAX_EDIT_BATCH, n: documents.length },
})}
@@ -250,7 +250,7 @@ This will mostly be used inside a modal but isn't dependent on one.
{$_("dialogReprocessDialog.confirm")}
- onclose?.()}>
+ onclose?.()}>
{$_("edit.cancel")}
diff --git a/src/lib/components/forms/Share.svelte b/src/lib/components/forms/Share.svelte
index a4a80e745..4fc0410a4 100644
--- a/src/lib/components/forms/Share.svelte
+++ b/src/lib/components/forms/Share.svelte
@@ -116,13 +116,13 @@
{#if access === "private"}