From 0b075f221156383e3bd27b017ba9e8b8ca8d6c0a Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Wed, 11 Sep 2024 14:29:16 -0500 Subject: [PATCH 1/6] fix: new view isn't added below the others reproduction: 1. go to playground, reset topic 2. add new view - should be the third, given order = 2 3. delete the first two 4. add another observe new view is added before the third, given order = 1 --- src/web/view/quickViewStore/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/view/quickViewStore/store.ts b/src/web/view/quickViewStore/store.ts index fd537cae..6ba7987b 100644 --- a/src/web/view/quickViewStore/store.ts +++ b/src/web/view/quickViewStore/store.ts @@ -127,7 +127,7 @@ export const createView = () => { id: newViewId, type: "quick", title: newTitle, - order: state.views.length, + order: Math.max(...state.views.map((view) => view.order)) + 1, viewState: currentView, }; From 0facc834044f00550b8b06e34e15527173af9122 Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Thu, 12 Sep 2024 09:48:05 -0500 Subject: [PATCH 2/6] fix: some homepage urls are broken was incorrectly using `path.join`, which is not intended for URLs. --- src/web/common/urls.ts | 11 +++++------ src/web/home/CoreIdeasSection.tsx | 3 ++- src/web/home/Footer.tsx | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/web/common/urls.ts b/src/web/common/urls.ts index ba50a8ee..0e5216e3 100644 --- a/src/web/common/urls.ts +++ b/src/web/common/urls.ts @@ -1,14 +1,13 @@ -import path from "path"; - export const examplesPage = "/examples"; export const docsPage = "https://ameliorate.app/docs"; -export const discourseSessionsPage = path.join(docsPage, "/discourse-sessions"); -export const gettingStartedPage = path.join(docsPage, "/getting-started"); +// would be nice if there were an easy way to join these; `path.join` doesn't work well with "https://", and `new URL` doesn't allow appending to a basepath with subdirectories +export const discourseSessionsPage = docsPage + "/discourse-sessions"; +export const gettingStartedPage = docsPage + "/getting-started"; export const githubRepo = "https://github.com/amelioro/ameliorate"; -export const contributingPage = path.join(githubRepo, "/blob/main/CONTRIBUTING.md"); -export const feedbackPage = path.join(githubRepo, "/blob/main/CONTRIBUTING.md#providing-feedback"); +export const contributingPage = githubRepo + "/blob/main/CONTRIBUTING.md"; +export const feedbackPage = githubRepo + "/blob/main/CONTRIBUTING.md#providing-feedback"; export const celebrateGif = "https://github.com/user-attachments/assets/e87009a0-4423-4406-b2f1-5a161d620fbb"; diff --git a/src/web/home/CoreIdeasSection.tsx b/src/web/home/CoreIdeasSection.tsx index ce510f59..f68b22cb 100644 --- a/src/web/home/CoreIdeasSection.tsx +++ b/src/web/home/CoreIdeasSection.tsx @@ -3,6 +3,7 @@ import Image from "next/image"; import { useState } from "react"; import { Link } from "@/web/common/components/Link"; +import { gettingStartedPage } from "@/web/common/urls"; import { Card } from "@/web/home/Card"; export const CoreIdeasSection = () => { @@ -79,7 +80,7 @@ export const CoreIdeasSection = () => { Break things down Check out{" "} - + Getting Started {" "} for a more detailed explanation of the core ideas. diff --git a/src/web/home/Footer.tsx b/src/web/home/Footer.tsx index f5cfca86..abf484eb 100644 --- a/src/web/home/Footer.tsx +++ b/src/web/home/Footer.tsx @@ -6,8 +6,10 @@ import { contributingPage, discordInvite, discourseSessionsPage, + docsPage, facebookPage, feedbackPage, + gettingStartedPage, githubRepo, youtubeChannel, } from "@/web/common/urls"; @@ -17,10 +19,10 @@ export const Footer = () => {
Ameliorate - + Docs - + Getting Started From 6febbf3193aa09f41465093cc31ddb5c58a2ed69 Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Thu, 12 Sep 2024 09:58:08 -0500 Subject: [PATCH 3/6] touchup: core-ideas use example ontology topic instead of from keyserj user's ontology topic. this topic was intentionally duplicated to /examples so that it's easier to find. --- docs-site/pages/getting-started/core-ideas.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-site/pages/getting-started/core-ideas.mdx b/docs-site/pages/getting-started/core-ideas.mdx index 9dddebe8..51dcaa53 100644 --- a/docs-site/pages/getting-started/core-ideas.mdx +++ b/docs-site/pages/getting-started/core-ideas.mdx @@ -61,7 +61,7 @@ Since these nodes are used to defined the Topic's breakdown, they're sometimes r All possible nodes and their purpose can be seen in the [Ontology - Topic](https://ameliorate.app/keyserj/ameliorate-ontology?view=All+structure+with+selected+node). + Topic](https://ameliorate.app/examples/ontology?view=All+breakdown). From 1781f6d828aee4a8b291d3b71c59f5fe9b92ffbb Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Thu, 12 Sep 2024 10:04:42 -0500 Subject: [PATCH 4/6] docs: point to "My Topics" via header instead of previously through user profile --- docs-site/pages/getting-started/your-first-topic.mdx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs-site/pages/getting-started/your-first-topic.mdx b/docs-site/pages/getting-started/your-first-topic.mdx index 92e3ff87..64a5278d 100644 --- a/docs-site/pages/getting-started/your-first-topic.mdx +++ b/docs-site/pages/getting-started/your-first-topic.mdx @@ -47,17 +47,11 @@ Once you create an account, you'll need to select a username: height={212} /> -After selecting a username, you'll be redirected to the page you were just on. To get to your user page where you'll create topics, click on your profile icon and select "My Topics": +After selecting a username, you'll be redirected to the page you were just on. To get to your user page where you'll create topics, click on "My Topics" in the header: - - From eebff522d041be1c61964b4b8a54b9be6645c25f Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Thu, 12 Sep 2024 10:42:49 -0500 Subject: [PATCH 5/6] fix: tutorial gifs sometimes rendered as images also took this time to put keys above src. little nicer since src is the same value, and key is not image-specific. --- src/web/tutorial/steps/addingNuance.tsx | 22 +++++++++------ src/web/tutorial/steps/breakdown.tsx | 14 +++++----- src/web/tutorial/steps/buildingViews.tsx | 27 ++++++++++++------- src/web/tutorial/steps/diagramBasics.tsx | 16 ++++++----- .../tutorial/steps/evaluatingTradeoffs.tsx | 15 ++++++----- src/web/tutorial/steps/navigatingTopic.tsx | 12 ++++++--- src/web/tutorial/steps/readingDiagram.tsx | 13 +++++---- 7 files changed, 75 insertions(+), 44 deletions(-) diff --git a/src/web/tutorial/steps/addingNuance.tsx b/src/web/tutorial/steps/addingNuance.tsx index aa2d9988..f898a92f 100644 --- a/src/web/tutorial/steps/addingNuance.tsx +++ b/src/web/tutorial/steps/addingNuance.tsx @@ -25,11 +25,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ scoring a node } /> @@ -51,11 +52,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ viewing other perspectives } /> @@ -79,11 +81,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ justifying sentiments } /> @@ -106,11 +109,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ adding research } /> @@ -130,19 +134,19 @@ export const addingNuanceSteps: StepType[] = [ imageSlot={ <> note comment @@ -163,11 +167,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ indicators } /> @@ -189,11 +194,12 @@ export const addingNuanceSteps: StepType[] = [ } imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/breakdown.tsx b/src/web/tutorial/steps/breakdown.tsx index 28dabe6b..38811d83 100644 --- a/src/web/tutorial/steps/breakdown.tsx +++ b/src/web/tutorial/steps/breakdown.tsx @@ -32,11 +32,11 @@ export const breakdownSteps: StepType[] = [ imageSlot={ <> layout of details via cars-going-too-fast From:{" "} @@ -72,11 +72,11 @@ export const breakdownSteps: StepType[] = [ imageSlot={ <> problem details of climate-change From:{" "} @@ -110,11 +110,11 @@ export const breakdownSteps: StepType[] = [ imageSlot={ <> solution details of mta-congestion-pricing From:{" "} @@ -141,11 +141,12 @@ export const breakdownSteps: StepType[] = [ imageSlot={ <> showing that a benefit addresses a cause From:{" "} @@ -179,11 +180,11 @@ export const breakdownSteps: StepType[] = [ imageSlot={ <> showing a benefit fulfilling a criterion From:{" "} @@ -212,11 +213,12 @@ export const breakdownSteps: StepType[] = [ } imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/buildingViews.tsx b/src/web/tutorial/steps/buildingViews.tsx index d45b5b90..9dacb672 100644 --- a/src/web/tutorial/steps/buildingViews.tsx +++ b/src/web/tutorial/steps/buildingViews.tsx @@ -26,11 +26,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> clicking between views in cars-going-too-fast topic From:{" "} @@ -63,11 +64,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> showing the kinds of filters } @@ -97,11 +99,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> toggling on and off some Information Filters From:{" "} @@ -135,11 +138,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> changing some General Filters From:{" "} @@ -173,11 +177,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> showing neighbor indicator From:{" "} @@ -210,11 +215,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> showing and hiding neighbors From:{" "} @@ -248,11 +254,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> forcing nodes into layers From:{" "} @@ -285,11 +292,12 @@ export const buildingViewsSteps: StepType[] = [ imageSlot={ <> saving a Quick View } @@ -304,11 +312,12 @@ export const buildingViewsSteps: StepType[] = [ text="All right! You've finished learning all the basics for using Ameliorate. Now you can reap the fruits of your labor and start building some diagrams! 🔥" imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/diagramBasics.tsx b/src/web/tutorial/steps/diagramBasics.tsx index 3e5f9555..de8841ce 100644 --- a/src/web/tutorial/steps/diagramBasics.tsx +++ b/src/web/tutorial/steps/diagramBasics.tsx @@ -18,11 +18,11 @@ export const diagramBasicsSteps: StepType[] = [ Below is a problem node, which suggests that "cars going too fast in my neighborhood" is a problem.`} imageSlot={ problem node - cars going too fast } /> @@ -38,11 +38,12 @@ Below is a problem node, which suggests that "cars going too fast in my neighbor Note that editing is only possible if you created the topic or if you were given editing privileges.`} imageSlot={ editing node text } /> @@ -56,11 +57,12 @@ Note that editing is only possible if you created the topic or if you were given text={`When a node is selected, you can use the buttons that pop up to add related nodes.`} imageSlot={ adding a node } /> @@ -76,11 +78,12 @@ Note that editing is only possible if you created the topic or if you were given Advanced actions and configuration can be found by clicking on the More Actions wrench.`} imageSlot={ Other actions } /> @@ -94,11 +97,11 @@ Advanced actions and configuration can be found by clicking on the More Actions text={`Edges represent relations between nodes. We can read this bottom-up like: "street goes downhill" - causes -> "cars going too fast", or in plain English: "The street's hill causes cars to go too fast".`} imageSlot={ Edges } /> @@ -117,11 +120,12 @@ Advanced actions and configuration can be found by clicking on the More Actions } imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/evaluatingTradeoffs.tsx b/src/web/tutorial/steps/evaluatingTradeoffs.tsx index e4252be2..925a969c 100644 --- a/src/web/tutorial/steps/evaluatingTradeoffs.tsx +++ b/src/web/tutorial/steps/evaluatingTradeoffs.tsx @@ -25,11 +25,12 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste } imageSlot={ viewing criteria table } /> @@ -54,11 +55,11 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste imageSlot={ <> criteria table scores From:{" "} @@ -92,11 +93,11 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste imageSlot={ <> solution totals From:{" "} @@ -126,11 +127,11 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste } imageSlot={ Celebrate completed tutorial! } /> @@ -150,11 +151,12 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste } imageSlot={ Celebrate completed tutorial! } /> @@ -168,11 +170,12 @@ export const getEvaluatingTradeoffsSteps = (nextTutorial?: Tutorial | null): Ste text="Woot woot! Now you're ready to compare solutions in Ameliorate 🔥." imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/navigatingTopic.tsx b/src/web/tutorial/steps/navigatingTopic.tsx index 822dfffa..c6794fa3 100644 --- a/src/web/tutorial/steps/navigatingTopic.tsx +++ b/src/web/tutorial/steps/navigatingTopic.tsx @@ -25,11 +25,12 @@ export const navigatingTopicSteps: StepType[] = [ imageSlot={ <> clicking between views in cars-going-too-fast topic From:{" "} @@ -61,11 +62,12 @@ export const navigatingTopicSteps: StepType[] = [ imageSlot={ <> indicators } @@ -89,11 +91,12 @@ export const navigatingTopicSteps: StepType[] = [ } imageSlot={ viewing other perspectives } /> @@ -107,11 +110,12 @@ export const navigatingTopicSteps: StepType[] = [ text="Yay! You've learned the basics for viewing in Ameliorate. Now you can go forth and understand other people's topics! 🔥" imageSlot={ Celebrate completed tutorial! } /> diff --git a/src/web/tutorial/steps/readingDiagram.tsx b/src/web/tutorial/steps/readingDiagram.tsx index cd823d0b..b934f5ca 100644 --- a/src/web/tutorial/steps/readingDiagram.tsx +++ b/src/web/tutorial/steps/readingDiagram.tsx @@ -27,11 +27,11 @@ export const getReadingDiagramSteps = (nextTutorial?: Tutorial | null): StepType } imageSlot={ Edges } /> @@ -59,11 +59,11 @@ export const getReadingDiagramSteps = (nextTutorial?: Tutorial | null): StepType imageSlot={ <> layout of details via cars-going-too-fast From:{" "} @@ -96,11 +96,12 @@ export const getReadingDiagramSteps = (nextTutorial?: Tutorial | null): StepType } imageSlot={ scoring a node } /> @@ -120,11 +121,12 @@ export const getReadingDiagramSteps = (nextTutorial?: Tutorial | null): StepType } imageSlot={ Celebrate completed tutorial! } /> @@ -138,11 +140,12 @@ export const getReadingDiagramSteps = (nextTutorial?: Tutorial | null): StepType text="Woot woot! Now you're ready to understand other people's diagrams in Ameliorate 🔥." imageSlot={ Celebrate completed tutorial! } /> From 43f6b4cee21fc8353f6e539e4b157815024f1629 Mon Sep 17 00:00:00 2001 From: Joel Keyser Date: Thu, 12 Sep 2024 11:59:03 -0500 Subject: [PATCH 6/6] touchup: separate indicators for edge cells nice to have content indicators on separate line to match how nodes have them separated. but this makes common indicators shift off center which may be awkward. not 100% sure if this is better but can revert if it seems worse --- src/web/topic/components/CriteriaTable/EdgeCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/topic/components/CriteriaTable/EdgeCell.tsx b/src/web/topic/components/CriteriaTable/EdgeCell.tsx index fc42fcba..6ebf4df1 100644 --- a/src/web/topic/components/CriteriaTable/EdgeCell.tsx +++ b/src/web/topic/components/CriteriaTable/EdgeCell.tsx @@ -4,7 +4,7 @@ import { Edge } from "@/web/topic/utils/graph"; export const EdgeCell = ({ edge }: { edge: Edge }) => { return ( -
+