Skip to content

Add Missing Theme Tab Labels #766

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

Merged
merged 6 commits into from
Jan 18, 2025
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 .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.1
v22.13.0
4 changes: 3 additions & 1 deletion api/_lib/_notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ export async function getPostHtmlFromId(id: string) {
type: "html",
parent: videoHtml,
children: [],
blockId: block.blockId,
};
}
}
return block;
});

const mdString = n2m.toMarkdownString(mdblocks);
const html = marked(mdString);
const html = marked(mdString.parent);
return html;
}

Expand All @@ -95,6 +96,7 @@ Takes a block in the format
and returns an HTML <video /> element with audio muted and autoplay, looping enabled

*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function videoBlockToHtml(block: any) {
const markdown = block.parent;
const url = markdown.match(/\(([^)]+)\)/)[1];
Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"@vercel/node": "^2.15.10",
"eslint": "^8.3.0",
"jest": "^29.4.3",
"typescript": "^5.5.3"
"typescript": "5.5.3"
}
}
5 changes: 4 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"tailwindcss": "^3.2.6",
"ts-node": "^10.9.1",
"ts-unused-exports": "^7.0.3",
"typescript": "^5.5.3",
"typescript": "5.5.3",
"web-worker": "^1.2.0"
},
"jest": {
Expand All @@ -217,5 +217,8 @@
},
"overrides": {
"fork-ts-checker-webpack-plugin": "^6.5.3"
},
"engines": {
"node": "^22"
}
}
6 changes: 4 additions & 2 deletions app/scripts/autotranslations.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Configuration, OpenAIApi } from "openai";

import dotenv from "dotenv";
import fs from "fs";
import { Configuration, OpenAIApi } from "openai";
import path from "path";

dotenv.config("./env");

// Between Calls To Avoid Rate Limiting
Expand Down Expand Up @@ -124,7 +126,7 @@ for (const locale of locales) {
/** pop off the first 6 phrases */
const batch = phrases.splice(0, 6);

const prompt = `Translate phrases from en to ${locale}\n\nEN\n${batch
const prompt = `Translate the following UI text strings for a flowcharting app from English to ${locale}.\n\nEN\n${batch
.map((phrase) => `- ${phrase.text}`)
.join("\n")}\n\n${locale.toUpperCase()}\n`;

Expand Down
2 changes: 1 addition & 1 deletion app/src/components/LoadTemplateDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getContentInitialValue() {

export function LoadTemplateDialog() {
const [open, setOpen] = useState(false);
const [template, setTemplate] = useState<null | typeof templates[number]>(
const [template, setTemplate] = useState<null | (typeof templates)[number]>(
null
);
const [layout, setLayout] = useState(true);
Expand Down
10 changes: 6 additions & 4 deletions app/src/components/RenameButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ export const RenameButton = memo(function RenameButton({
<Trans>Rename</Trans>
</SectionTitle>
{hasProAccess && !isHosted ? (
<label className="flex gap-2 item-center mt-2">
<span className="text-xs opacity-80">
<Trans>Convert to hosted chart?</Trans>
</span>
<label
htmlFor="convert-to-hosted"
className="flex gap-2 items-center mt-2 text-xs opacity-80"
>
<Trans>Convert to hosted chart?</Trans>
<input
id="convert-to-hosted"
type="checkbox"
checked={convertToHosted}
onChange={(e) => {
Expand Down
55 changes: 51 additions & 4 deletions app/src/components/Tabs/ThemeTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,19 @@ const Form = createForm<{
},
{
label: t`Text Max Width`,
title: () => <Article className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<Article className="w-5 h-5" />
<span className="font-semibold">
<Trans>Text Max Width</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Maximum width of text inside nodes</Trans>
</span>
</div>
),
id: "textMaxWidth",
control: "range",
value(data) {
Expand Down Expand Up @@ -348,7 +360,18 @@ const Form = createForm<{
},
{
label: t`Text Horizontal Offset`,
title: () => t`Set Fixed Node Height`,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<span className="font-semibold">
<Trans>Fixed Node Height</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Enable to set a consistent height for all nodes</Trans>
</span>
</div>
),
id: "useFixedHeight",
control: "checkbox",
value(data) {
Expand All @@ -360,7 +383,19 @@ const Form = createForm<{
},
{
label: t`Fixed Node Height`,
title: () => <ArrowsOutLineVertical className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<ArrowsOutLineVertical className="w-5 h-5" />
<span className="font-semibold">
<Trans>Fixed Height</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Set a consistent height for all nodes</Trans>
</span>
</div>
),
id: "fixedHeight",
control: "range",
hidden(data) {
Expand Down Expand Up @@ -389,7 +424,19 @@ const Form = createForm<{
elements: [
{
label: t`Curve Style`,
title: () => <LineSegment className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<LineSegment className="w-5 h-5" />
<span className="font-semibold">
<Trans>Edge Style</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Choose how edges connect between nodes</Trans>
</span>
</div>
),
id: "curveStyle",
control: "select",
value(data) {
Expand Down
4 changes: 3 additions & 1 deletion app/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ div[data-reach-tooltip] {
}
}

.slang-type:not(.size-1):not(.size-2):not(.size-3):not(.size-4):not(.size-5):not(.size-6):not(.size--1) {
.slang-type:not(.size-1):not(.size-2):not(.size-3):not(.size-4):not(
.size-5
):not(.size-6):not(.size--1) {
letter-spacing: 0.0125em;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/loadTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { mountGraph, unmountGraph } from "./useUnmountStore";
* Loads a template given a template key
*/
export async function loadTemplate(
template: typeof templates[number] | null,
template: (typeof templates)[number] | null,
/** Whether to replace the content or not */
replaceContent: boolean,
/**
Expand Down
1 change: 1 addition & 0 deletions app/src/lib/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export async function makeChartPublic(id: number, isPublic: boolean) {
message: "Duplicate key value violates unique constraint",
details: "",
hint: "",
name: "PostgrestError",
};
// If unique violation, generate a new public id
let result;
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

Loading
Loading