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/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. + + + ); } diff --git a/pages/faq.js b/pages/faq.js index cfb5ea1..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{" "} @@ -238,15 +256,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. 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.