From a28eace08115573f60339a107fe6c14113cb4893 Mon Sep 17 00:00:00 2001 From: Mandyx22 <1915537307@qq.com> Date: Wed, 1 Jul 2026 11:08:21 -0400 Subject: [PATCH 1/3] feat: surface and document metadata production - Add "Recommended" badge next to the metadata toggle - Add a help popover next to the Metadata section heading linking to the FAQ - Expand FAQ item-11 explaining metadata production, with links to the getting started guide and Psych-DS documentation Co-Authored-By: Claude Opus 4.8 --- components/dashboard/MetadataControl.js | 6 +++- pages/admin/[experiment_id].js | 38 ++++++++++++++++++++++--- pages/faq.js | 29 ++++++++++++++----- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/components/dashboard/MetadataControl.js b/components/dashboard/MetadataControl.js index 464dc22..bef49e6 100644 --- a/components/dashboard/MetadataControl.js +++ b/components/dashboard/MetadataControl.js @@ -3,6 +3,7 @@ import { HStack, Switch, Stack, + Badge, } from "@chakra-ui/react"; import { useState } from "react"; @@ -19,7 +20,10 @@ export default function MetadataControl({ data }) { - Enable Psych-DS metadata production? + + Enable Psych-DS metadata production? + Recommended + - - Metadata - + + + Metadata + + + + + + + + + + + + Generates Psych-DS metadata describing your data's + columns (descriptions, value ranges, and levels), making + your dataset easier to share and reuse.{" "} + + Learn more + + + + + + + diff --git a/pages/faq.js b/pages/faq.js index cfb5ea1..04f7a65 100644 --- a/pages/faq.js +++ b/pages/faq.js @@ -238,15 +238,30 @@ export default function FAQ() { + + When enabled, DataPipe generates a dataset_description.json file in + your OSF project that describes your dataset and its variables + according to the Psych-DS specification. The file is updated + automatically as new sessions are uploaded. + + + For each variable, DataPipe records its data type and, when + available, a human-readable description from the relevant jsPsych + plugin documentation. It also combines information across sessions, + such as observed numeric ranges and categorical values. + - When enabled, DataPipe generates a metadata file describing your - data and its variables, following the{" "} - - Psych-DS + Metadata production is recommended when you plan to share or publish + your data because it makes the dataset easier to understand and + reuse. You can enable it from your experiment dashboard. See the{" "} + + getting started guide + {" "} + for setup instructions, or visit the{" "} + + Psych-DS documentation {" "} - specification. The file is stored in your OSF project as - dataset_description.json and is updated automatically after - each session. + to learn more. From b0fa96eaf15b5d3ddfca21ab0f1b9dcab993d1f7 Mon Sep 17 00:00:00 2001 From: Mandyx22 <1915537307@qq.com> Date: Wed, 1 Jul 2026 13:35:10 -0400 Subject: [PATCH 2/3] feat: cross-link Getting Started to the metadata FAQ - Add a "how it works" link in Getting Started step 4 that deep-links to FAQ item-11, and point the Psych-DS link at the Psych-DS docs - Make the FAQ accordion open and scroll to an item when arriving via its hash (e.g. /faq#item-11) Co-Authored-By: Claude Opus 4.8 --- pages/faq.js | 20 +++++++++++++++++++- pages/getting-started.js | 6 ++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pages/faq.js b/pages/faq.js index 04f7a65..ab0c9df 100644 --- a/pages/faq.js +++ b/pages/faq.js @@ -7,14 +7,32 @@ import { Box, } from "@chakra-ui/react"; import NextLink from "next/link"; +import { useState, useEffect } from "react"; export default function FAQ() { + const [openItems, setOpenItems] = useState(["item-0"]); + + useEffect(() => { + const hash = window.location.hash.replace("#", ""); + if (!hash) return; + setOpenItems((prev) => (prev.includes(hash) ? prev : [...prev, hash])); + // Wait for the accordion to expand, then bring the item's trigger into view. + // Chakra doesn't forward `id` to the DOM, so target the trigger via its + // data-controls attribute and offset for the fixed navbar. + setTimeout(() => { + const el = document.querySelector(`[data-controls$=":content:${hash}"]`); + if (!el) return; + const top = el.getBoundingClientRect().top + window.scrollY - 80; + window.scrollTo({ top, behavior: "smooth" }); + }, 350); + }, []); + return ( FAQ - + setOpenItems(e.value)} multiple collapsible> Follow our{" "} diff --git a/pages/getting-started.js b/pages/getting-started.js index 06ac44d..abade5f 100644 --- a/pages/getting-started.js +++ b/pages/getting-started.js @@ -211,10 +211,12 @@ export default function GettingStarted() { — automatically produce metadata adhering to{" "} - + Psych-DS - , updated after each session. + , updated after each session. See{" "} + how it works + {" "}in the FAQ. From c4edecaec6d79ccf60c26e7d2201eb10a31e5ccb Mon Sep 17 00:00:00 2001 From: Mandyx22 <1915537307@qq.com> Date: Mon, 6 Jul 2026 14:36:42 -0400 Subject: [PATCH 3/3] feat: metadata popover docs link + status-label tooltips - Point the metadata help popover's "Learn more" link at the Psych-DS docs - Add hover tooltips to the experiment-list status labels (Data, Base64, Conditions, Metadata) describing each feature and its enabled state Co-Authored-By: Claude Opus 4.8 --- pages/admin/[experiment_id].js | 5 ++-- pages/admin/index.js | 42 +++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/pages/admin/[experiment_id].js b/pages/admin/[experiment_id].js index f3a4a38..9aed7be 100644 --- a/pages/admin/[experiment_id].js +++ b/pages/admin/[experiment_id].js @@ -6,7 +6,6 @@ import { db, auth } from "../../lib/firebase"; import { doc, collection, query, where, orderBy } from "firebase/firestore"; import { Spinner, Flex, VStack, HStack, Text, Badge, Separator, Popover, IconButton, Link } from "@chakra-ui/react"; -import NextLink from "next/link"; import { CircleHelp } from "lucide-react"; import Title from "../../components/dashboard/Title"; @@ -142,8 +141,8 @@ function ExperimentPageDashboard({ experiment_id }) { Generates Psych-DS metadata describing your data's columns (descriptions, value ranges, and levels), making your dataset easier to share and reuse.{" "} - - Learn more + + Learn more diff --git a/pages/admin/index.js b/pages/admin/index.js index c478329..5930b66 100644 --- a/pages/admin/index.js +++ b/pages/admin/index.js @@ -19,6 +19,7 @@ import { Card, CloseButton, Link as ChakraLink, + Tooltip, } from "@chakra-ui/react"; import { Trash2, Pencil } from "lucide-react"; @@ -202,10 +203,10 @@ function ExperimentItem({ exp }) { - - - - + + + + {exp.sessions > 0 && ( {exp.sessions} {exp.sessions === 1 ? "session" : "sessions"} @@ -219,19 +220,28 @@ function ExperimentItem({ exp }) { ); } -function StatusLabel({ label, on }) { +function StatusLabel({ label, on, feature }) { return ( - - - - {label} - - + + + + + + {label} + + + + + + {feature} is {on ? "enabled" : "disabled"} for this experiment. + + + ); }