From f5d7c310bd442c8f478f77ab91667e6ccba39bc9 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Fri, 8 Nov 2024 09:34:35 -0500 Subject: [PATCH] Is this the problem? (#817) * Is this the problem? * Just confirming something * No SSR the description * Is it the header? * dispatch * Clean field description * href * remove preview config * code * Update src/routes/(app)/add-ons/[owner]/[repo]/+page.ts Co-authored-by: Allan Lasser --------- Co-authored-by: Allan Lasser --- Makefile | 6 +-- local.yml | 54 +++---------------- src/lib/components/accounts/Mailkey.svelte | 12 ++--- src/lib/components/addons/AddOnMeta.svelte | 7 +-- src/lib/components/inputs/Field.svelte | 11 +++- .../components/navigation/Breadcrumbs.svelte | 9 ++-- .../(app)/add-ons/[owner]/[repo]/+page.ts | 2 - .../add-ons/[owner]/[repo]/[event]/+page.ts | 2 - 8 files changed, 31 insertions(+), 72 deletions(-) diff --git a/Makefile b/Makefile index bc2da42c2..9d7f71b41 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,12 @@ build-browser-test: dev: docker compose -f local.yml up documentcloud_frontend +preview: + docker compose -f local.yml up preview + down: docker compose -f local.yml down -build-serve: - docker compose -f local.yml up documentcloud_frontend_build - clean: @echo deleting Webpack chunks rm -f public/index.html public/[0-9]*.*.* public/bundle.*.js public/bundle.*.css public/bundle.*.txt public/*.map public/*.*.js diff --git a/local.yml b/local.yml index 3e9136b95..e3ff1c027 100644 --- a/local.yml +++ b/local.yml @@ -19,60 +19,14 @@ services: DOCKER: true NODE_TLS_REJECT_UNAUTHORIZED: 0 # todo: solve local certificate chain issues NODE_ENV: development - PUPPETEER_SKIP_DOWNLOAD: true - documentcloud_frontend_app: + preview: image: node:20 volumes: - nodemodules:/app/node_modules - .:/app working_dir: /app - command: npm run dev - networks: - default: - aliases: - - internal.www.dev.documentcloud.org - squarelet_default: - aliases: - - internal.www.dev.documentcloud.org - - documentcloud_frontend_embed: - image: node:20 - volumes: - - nodemodules:/app/node_modules - - .:/app - working_dir: /app - command: npm run dev - networks: - default: - aliases: - - internal.www.dev.documentcloud.org - squarelet_default: - aliases: - - internal.www.dev.documentcloud.org - - documentcloud_frontend_build: - image: node:20 - volumes: - - nodemodules:/app/node_modules - - .:/app - working_dir: /app - command: npm run build-serve - networks: - default: - aliases: - - internal.www.dev.documentcloud.org - squarelet_default: - aliases: - - internal.www.dev.documentcloud.org - - documentcloud_frontend_analyze: - image: node:20 - volumes: - - nodemodules:/app/node_modules - - .:/app - working_dir: /app - command: npm run build-analyze + command: npm run preview networks: default: aliases: @@ -80,6 +34,10 @@ services: squarelet_default: aliases: - internal.www.dev.documentcloud.org + environment: + DOCKER: true + NODE_TLS_REJECT_UNAUTHORIZED: 0 # todo: solve local certificate chain issues + NODE_ENV: development volumes: nodemodules: diff --git a/src/lib/components/accounts/Mailkey.svelte b/src/lib/components/accounts/Mailkey.svelte index f9d2b1fff..c032c5d04 100644 --- a/src/lib/components/accounts/Mailkey.svelte +++ b/src/lib/components/accounts/Mailkey.svelte @@ -62,12 +62,12 @@

{/if} - - + + diff --git a/src/lib/components/addons/AddOnMeta.svelte b/src/lib/components/addons/AddOnMeta.svelte index b203fe628..24fe1a659 100644 --- a/src/lib/components/addons/AddOnMeta.svelte +++ b/src/lib/components/addons/AddOnMeta.svelte @@ -6,7 +6,7 @@ import { MarkGithub16 } from "svelte-octicons"; import Button from "$lib/components/common/Button.svelte"; - import Flex from "@/lib/components/common/Flex.svelte"; + import Flex from "$lib/components/common/Flex.svelte"; import Metadata from "../common/Metadata.svelte"; import { ALLOWED_TAGS, ALLOWED_ATTR } from "@/config/config.js"; @@ -15,9 +15,6 @@ $: repo = new URL(addon.repository, "https://github.com/").href; $: github_org = addon.repository.split("/")[0]; - $: description = addon.parameters.description - ? clean(addon.parameters.description) - : ""; $: instructions = addon.parameters.instructions ? clean(addon.parameters.instructions) : ""; @@ -30,7 +27,7 @@

{addon.name}

- {@html description} + {@html addon.parameters?.description}
{#if instructions}
diff --git a/src/lib/components/inputs/Field.svelte b/src/lib/components/inputs/Field.svelte index 58f4899a7..f2c2f8f9e 100644 --- a/src/lib/components/inputs/Field.svelte +++ b/src/lib/components/inputs/Field.svelte @@ -1,9 +1,18 @@
@@ -14,7 +23,7 @@ {#if description} -

{@html description}

+

{@html clean(description ?? "")}

{/if}
diff --git a/src/lib/components/navigation/Breadcrumbs.svelte b/src/lib/components/navigation/Breadcrumbs.svelte index bf3014c0f..85026d2ec 100644 --- a/src/lib/components/navigation/Breadcrumbs.svelte +++ b/src/lib/components/navigation/Breadcrumbs.svelte @@ -15,10 +15,9 @@ export let trail: Breadcrumb[] = []; - let width: number; - $: BREAKPOINTS = { - SHOW_BREADCRUMBS: width > remToPx(32), - }; + let width: number = 1000; + + $: SHOW_BREADCRUMBS = width > remToPx(32);