NIHTB-CB - List Sorting Working Memory Task Implementation#34
NIHTB-CB - List Sorting Working Memory Task Implementation#34cherriechang wants to merge 43 commits into
Conversation
🦋 Changeset detectedLatest commit: af5a11b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…led sets not necessarily == number of dimensions)
…mpling of same groups
…up within a set more than once
… whether all categories are correct
…rticipant answers correctly
…ut default to sampling live stimuli for that section; properly handle params in createTimeline() for choosing how many practice sequences, max_attempts for practice vs live
cherriechang
left a comment
There was a problem hiding this comment.
Reviewed changes: add list-sorting-working-memory as package; delete templates folder
There was a problem hiding this comment.
Pull Request Overview
This PR adds the List Sorting Working Memory task package by introducing inline SVG assets for animal images.
- Adds new SVG exports for turtle, tiger, sheep, and rabbit under
images-animals - Each file defines an
export const ...Svgtemplate literal containing the full SVG markup
Reviewed Changes
Copilot reviewed 22 out of 134 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/list-sorting-working-memory/assets/images/images-animals/turtle.js | Adds turtleSvg inline SVG export |
| packages/list-sorting-working-memory/assets/images/images-animals/tiger.js | Adds tigerSvg inline SVG export |
| packages/list-sorting-working-memory/assets/images/images-animals/sheep.js | Adds sheepSvg inline SVG export |
| packages/list-sorting-working-memory/assets/images/images-animals/rabbit.js | Adds rabbitSvg inline SVG export |
Comments suppressed due to low confidence (4)
packages/list-sorting-working-memory/assets/images/images-animals/turtle.js:1
- [nitpick] Embedding very large SVG strings directly in JS files can increase bundle size and reduce readability. Consider storing these SVGs as separate
.svgfiles and importing them at runtime or using a loader.
export const turtleSvg = `<?xml version="1.0" encoding="UTF-8"?>
packages/list-sorting-working-memory/assets/images/images-animals/tiger.js:1
- [nitpick] Consider moving this inline SVG into an external asset and importing it to keep the JS module concise and improve load performance.
export const tigerSvg = `<?xml version="1.0" encoding="UTF-8"?>
packages/list-sorting-working-memory/assets/images/images-animals/sheep.js:1
- [nitpick] Large template literals make the code hard to scan. Extract this SVG into its own file and reference it to improve maintainability.
export const sheepSvg = `<?xml version="1.0" encoding="UTF-8"?>
packages/list-sorting-working-memory/assets/images/images-animals/rabbit.js:1
- [nitpick] Inlining the SVG in JS bloats the module. You could load the SVG via a fetch or import an
.svgasset to keep the JS file focused on logic.
export const rabbitSvg = `<?xml version="1.0" encoding="UTF-8"?>
… sequence in timelineUnits; re-generate readme docs
This PR is to implement and add the List Sorting Working Memory task in the NIH Toolbox Cognition Battery as an individual jsPsych experiment package under
packages. The implementation must follow the latest standardization framework detailed in the timelines template injspsych-dev.