Skip to content

Commit

Permalink
The one with the Templates (#715)
Browse files Browse the repository at this point in the history
* Scaffolding screenshotting script

* Working template screenshot generation

* Remove background color

* Add thumbnails and replace images with generated ones

* Remove previous template images

* Remove legacy /api/prompt/text endpoint

* Add new templates

* Remove new/ai e2e test
  • Loading branch information
rob-gordon authored Aug 16, 2024
1 parent 73cd3cc commit 8f95b8a
Show file tree
Hide file tree
Showing 55 changed files with 1,143 additions and 596 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.12.1
v18.17.1
289 changes: 0 additions & 289 deletions api/prompt/text.ts

This file was deleted.

14 changes: 0 additions & 14 deletions app/e2e/pro.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,6 @@ test("Go to Sandbox. Save Sandbox Chart", async () => {
await expect(page).toHaveURL(new RegExp(`${BASE_URL}/u/\\d+`));
});

test("Create chart from AI", async () => {
await page.getByTestId("new-chart-link").click();
await page.getByTestId("Use AI").click();
await page.locator('textarea[name="subject"]').click();
await page
.locator('textarea[name="subject"]')
.fill("the stages of the water cycle");
await page.getByTestId("Create Chart").click();
// expect url to be regex BASE_URL + /u/\d+
await expect(page).toHaveURL(new RegExp(`${BASE_URL}/u/\\d+`), {
timeout: 1000 * 60 * 4,
});
});

test("Create chart from imported data", async () => {
try {
await page.getByTestId("new-chart-link").click();
Expand Down
6 changes: 4 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"generate:types": "export $(cat .env.local | xargs) && supabase gen types typescript --project-id \"${PROJECT_ID}\" > src/types/database.types.ts",
"analyze": "source-map-explorer 'build/static/js/*.js'",
"autotranslations": "node scripts/autotranslations.mjs",
"theme:schema:generate": "pnpx ts-json-schema-generator --path 'src/lib/FFTheme.ts' --type 'FFTheme' -f tsconfig.json --strict-tuples -o src/lib/FFTheme.schema.json --minify --no-top-ref"
"theme:schema:generate": "pnpx ts-json-schema-generator --path 'src/lib/FFTheme.ts' --type 'FFTheme' -f tsconfig.json --strict-tuples -o src/lib/FFTheme.schema.json --minify --no-top-ref",
"screenshot-templates": "node scripts/screenshot-templates.mjs"
},
"dependencies": {
"@ai-sdk/openai": "^0.0.37",
Expand Down Expand Up @@ -201,7 +202,8 @@
"ts-node": "^10.9.1",
"ts-unused-exports": "^7.0.3",
"typescript": "^5.5.3",
"web-worker": "^1.2.0"
"web-worker": "^1.2.0",
"playwright": "1.45.2"
},
"jest": {
"testMatch": [
Expand Down
Binary file added app/public/template-screenshots/code-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/decision-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/mindmap-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/mindmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/org-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/pert-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/thumb_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/template-screenshots/thumb_mindmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/public/templates/template11.png
Diff not rendered.
Binary file removed app/public/templates/template17.png
Diff not rendered.
Binary file removed app/public/templates/template18.png
Diff not rendered.
Binary file removed app/public/templates/template19.png
Diff not rendered.
Binary file removed app/public/templates/template20.png
Diff not rendered.
Binary file removed app/public/templates/template21.png
Diff not rendered.
Binary file removed app/public/templates/template9.png
Diff not rendered.
Loading

0 comments on commit 8f95b8a

Please sign in to comment.