improve ux for robins and add missing sections#66
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughRemoves an architecture-goals.md design document and substantially refactors the ROBINS‑I checklist: updates checklist-map entries, adds Planning/SectionA/SectionC/SectionD components, replaces radio inputs with toggle buttons in judgement/direction UIs, and integrates new sections into the main checklist component. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25–30 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
corates | 952ecda | Commit Preview URL | Dec 16 2025, 05:03 PM |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx (1)
7-7: Remove unused domainId prop.The
domainIdprop is documented and accepted but never used in the component body.Apply this diff:
/** * Domain judgement selector with risk of bias level and optional direction * @param {Object} props - * @param {string} props.domainId - Unique domain identifier * @param {string} props.judgement - Current judgement valueAlso applies to: 16-16
🧹 Nitpick comments (4)
packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx (1)
42-69: Consider using createMemo for the isSelected computation.While the current arrow function approach works, using
createMemowould be more explicit about reactive tracking and align with SolidJS best practices.As per coding guidelines, when computing values based on props, prefer
createMemo:+import { For, createMemo } from 'solid-js';<For each={ROB_JUDGEMENTS}> {judgement => { - const isSelected = () => props.judgement === judgement; + const isSelected = createMemo(() => props.judgement === judgement); return (Apply the same pattern to the direction buttons (lines 82-107).
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsx (1)
12-21: Potential issue: Unnecessary spread may cause performance issues.The
handleSourceTogglefunction spreadsprops.sectionDStateon every toggle. IfsectionDStatecontains large nested objects beyondsourcesandotherSpecify, this could be inefficient. However, based on the JSDoc (line 7), it appears the state structure is simple, so this is likely fine.If
sectionDStateever grows to include large nested data, consider updating only thesourcesobject:function handleSourceToggle(sourceName) { - const newSources = { - ...props.sectionDState?.sources, - [sourceName]: !props.sectionDState?.sources?.[sourceName], - }; props.onUpdate({ ...props.sectionDState, - sources: newSources, + sources: { + ...props.sectionDState?.sources, + [sourceName]: !props.sectionDState?.sources?.[sourceName], + }, }); }packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsx (1)
13-17: Consider co-locating field-to-state mapping.The
fieldToStateKeymapping is hardcoded here but could be defined inchecklist-map.jsalongsideSECTION_Afor better maintainability. Based on the relevant snippets,SECTION_Aitems in checklist-map.js don't have astateKeyproperty, unlike other sections (e.g.,SECTION_C.c1.stateKey).To improve consistency across sections and reduce duplication, consider adding
stateKeyto each field inSECTION_Awithinchecklist-map.js:// In checklist-map.js export const SECTION_A = { a1: { id: 'a1', label: 'A1', text: 'Specify the numerical result being assessed', placeholder: 'e.g., OR = 1.5 (95% CI: 1.2-1.9)', type: 'textarea', stateKey: 'numericalResult', // Add this }, // ... similar for a2 and a3 };Then in SectionA.jsx, you can access it directly:
- const fieldToStateKey = { - a1: 'numericalResult', - a2: 'furtherDetails', - a3: 'outcome', - }; - const stateKey = fieldToStateKey[key]; + const stateKey = field.stateKey;packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsx (1)
13-16: Minor: Functions could be constants.The
textFields()andc4Field()functions don't access reactive state, so they could be constants or moved outside the component for clarity. However, wrapping them as functions is harmless and maintains consistency.For slight performance improvement, consider:
- const textFields = () => - Object.entries(SECTION_C).filter(([_key, field]) => field.type === 'textarea'); - const c4Field = () => SECTION_C.c4; + const textFields = Object.entries(SECTION_C).filter(([_key, field]) => field.type === 'textarea'); + const c4Field = SECTION_C.c4;And update usages to remove
():- <For each={textFields()}> + <For each={textFields}>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
architecture-goals.md(0 hunks)packages/web/src/ROBINS-I/checklist-map.js(3 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx(5 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsx(4 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsx(1 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx(3 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsx(1 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsx(1 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsx(1 hunks)packages/web/src/components/checklist-ui/ROBINSIChecklist/index.js(1 hunks)
💤 Files with no reviewable changes (1)
- architecture-goals.md
🧰 Additional context used
📓 Path-based instructions (7)
packages/web/src/components/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
For UI icons, use the
solid-iconslibrary or SVGs only. Do not use emojis
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.jspackages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursorrules)
**/*.{js,jsx,ts,tsx}: Prefer modern ES6+ syntax and features
Use aliases for imports when appropriate to improve readability
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.jspackages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsxpackages/web/src/ROBINS-I/checklist-map.js
packages/web/src/components/**
📄 CodeRabbit inference engine (.cursorrules)
Group related components in subdirectories with an
index.jsbarrel export
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.jspackages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx
packages/web/src/**/*.{jsx,tsx,js,ts}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/**/*.{jsx,tsx,js,ts}: When you need to compute a value based on props or state in SolidJS, usecreateMemoto ensure it updates reactively
For complex state or state objects in SolidJS, use Solid'screateStorefor better performance and reactivity
Create reusable logic in 'primitives' (hooks) that can be shared across components to keep components clean and focused on rendering
packages/web/src/**/*.{jsx,tsx,js,ts}: For UI icons, use thesolid-iconslibrary or SVGs only. Do not use emojis
Use Solid'screateStorefor complex state or state objects to ensure better performance and reactivity
Create reusable logic in primitives (hooks) that can be shared across components to keep components clean and focused on rendering
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.jspackages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsxpackages/web/src/ROBINS-I/checklist-map.js
packages/web/src/components/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursorrules)
packages/web/src/components/**/*.{jsx,tsx}: Use responsive design principles for UI components
When implementing UI components, use zag.js frompackages/web/src/components/zag/*and reuse existing components
Do NOT prop-drill application state in SolidJS components - shared or cross-feature state must live in external stores underpackages/web/src/stores/or relative to the component file
Components should receive at most 1-5 props, and only for local configuration, not shared state - if a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
In SolidJS components, do not destructure props as it breaks reactivity - instead access props directly from the props object, or wrap them in a function to ensure they are always up-to-date
Components should be lean and focused - do not implement business logic in components; move that into stores, utilities, or primitives
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx
packages/{web,landing}/src/**/*.{jsx,tsx,css}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use responsive design principles for UI components
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx
packages/web/src/**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/web/src/**/*.{jsx,tsx}: Use Zag.js for UI components and design system
Reference existing Zag.js components inpackages/web/src/components/zag/*and consult the README.md and documentation before adding new components or debugging
Do NOT prop-drill application state. Shared or cross-feature state must live in external stores under packages/web/src/stores/ or relative to the component file
Components should receive at most 1–5 props, and only for local configuration, not shared state. If a component would need more than 5 props, move the shared data into an external store, a primitive, or Solid context
Do not destructure props in SolidJS components as it breaks reactivity. Instead access props directly from the props object or wrap them in a function to ensure they are always up-to-date
UsecreateMemofor derived values based on props or state to ensure reactive updates
Components should be lean and focused and should not implement business logic. Move business logic into stores, utilities, or primitives
Files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsxpackages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx
🧠 Learnings (4)
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/components/** : Group related components in subdirectories with an `index.js` barrel export
Applied to files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.js
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : For complex state or state objects in SolidJS, use Solid's `createStore` for better performance and reactivity
Applied to files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx
📚 Learning: 2025-12-16T05:05:58.178Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-16T05:05:58.178Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : Use Solid's `createStore` for complex state or state objects to ensure better performance and reactivity
Applied to files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx
📚 Learning: 2025-12-16T00:29:26.670Z
Learnt from: CR
Repo: InfinityBowman/corates PR: 0
File: .cursorrules:0-0
Timestamp: 2025-12-16T00:29:26.670Z
Learning: Applies to packages/web/src/**/*.{jsx,tsx,js,ts} : When you need to compute a value based on props or state in SolidJS, use `createMemo` to ensure it updates reactively
Applied to files:
packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx
🧬 Code graph analysis (6)
packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsx (1)
packages/web/src/ROBINS-I/checklist-map.js (2)
PLANNING_SECTION(105-117)PLANNING_SECTION(105-117)
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsx (2)
packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsx (1)
value(20-20)packages/web/src/ROBINS-I/checklist-map.js (2)
SECTION_A(120-143)SECTION_A(120-143)
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsx (3)
packages/web/src/ROBINS-I/checklist-map.js (2)
SECTION_C(167-205)SECTION_C(167-205)packages/web/src/lib/referenceParser.js (1)
field(104-104)packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsx (1)
value(20-20)
packages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsx (2)
packages/web/src/components/sidebar/ChecklistTreeItem.jsx (1)
isSelected(12-12)packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx (1)
getJudgementColor(19-34)
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsx (1)
packages/web/src/ROBINS-I/checklist-map.js (4)
SECTION_D(83-94)SECTION_D(83-94)INFORMATION_SOURCES(66-80)INFORMATION_SOURCES(66-80)
packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx (1)
packages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsx (1)
getJudgementColor(31-48)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Workers Builds: corates
🔇 Additional comments (12)
packages/web/src/components/checklist-ui/ROBINSIChecklist/DomainJudgement.jsx (1)
81-108: Direction selector implementation looks good.The button-based direction selector correctly mirrors the judgement selector pattern, with appropriate optional chaining for the callback and consistent toggle behavior.
packages/web/src/components/checklist-ui/ROBINSIChecklist/OverallSection.jsx (2)
31-48: LGTM - Good color mapping expansion.The expanded color mapping correctly handles the new judgement variants. The function remains a pure helper without side effects.
92-118: Verify toggle behavior matches user expectations.The toggle implementation allows deselecting a judgement (setting to
null). While this provides flexibility, ensure this matches the intended UX—typically, risk of bias judgements require a selection and shouldn't be clearable once set.Consider whether the overall risk judgement should always require a value, or if clearing to
nullis acceptable in your workflow.packages/web/src/components/checklist-ui/ROBINSIChecklist/PlanningSection.jsx (1)
1-54: LGTM - Clean implementation.The component follows SolidJS best practices with proper reactivity patterns and a focused responsibility.
packages/web/src/components/checklist-ui/ROBINSIChecklist/index.js (1)
6-10: LGTM - Proper barrel export pattern.The expanded exports follow the established pattern and coding guidelines for component organization.
Based on learnings, the barrel export pattern is correctly applied.
packages/web/src/components/checklist-ui/ROBINSIChecklist/ROBINSIChecklist.jsx (2)
38-56: LGTM - Consistent handler pattern.The new handlers maintain consistency with the existing update pattern, properly forwarding section updates to the parent via the object-style API.
81-122: LGTM - Clean section integration.The new sections are properly integrated with consistent prop patterns and update handlers. The flow from Planning → Preliminary Considerations (A, B, C, D) → Domains is logical and well-structured.
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionD.jsx (1)
41-61: LGTM - Responsive grid layout.The grid implementation properly uses Tailwind's responsive breakpoints and provides good visual feedback for checked states.
packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionA.jsx (1)
39-71: LGTM - Proper reactive pattern.The
value()function is correctly defined inside the For loop to ensure reactivity, and the component structure is clean.packages/web/src/components/checklist-ui/ROBINSIChecklist/SectionC.jsx (1)
73-101: LGTM - Proper radio implementation.The C4 protocol type radio group is well-implemented with proper visual feedback and disabled state handling.
packages/web/src/ROBINS-I/checklist-map.js (2)
70-80: LGTM - Improved clarity with examples.The expanded descriptions with specific examples improve user guidance. Removing "Other" from the array is correct since it's now handled by
SECTION_D.otherField.
82-94: LGTM - Well-structured section definitions.The new section exports (
SECTION_D,PLANNING_SECTION,SECTION_C) are well-structured with clear field definitions and consistent patterns.Also applies to: 104-117, 166-205
| // Section A: Specify the result being assessed for risk of bias | ||
| export const SECTION_A = { | ||
| a1: { | ||
| id: 'a1', | ||
| label: 'A1', | ||
| text: 'Specify the numerical result being assessed', | ||
| placeholder: 'e.g., OR = 1.5 (95% CI: 1.2-1.9)', | ||
| type: 'textarea', | ||
| }, | ||
| a2: { | ||
| id: 'a2', | ||
| label: 'A2', | ||
| text: 'Provide further details about this result (for example, location in the study report, reason it was chosen)', | ||
| optional: true, | ||
| placeholder: 'e.g., Table 3, primary outcome analysis', | ||
| type: 'textarea', | ||
| }, | ||
| a3: { | ||
| id: 'a3', | ||
| label: 'A3', | ||
| text: 'Specify the outcome to which this result relates', | ||
| placeholder: 'e.g., All-cause mortality at 12 months', | ||
| type: 'textarea', | ||
| }, | ||
| }; |
There was a problem hiding this comment.
Inconsistency: Missing stateKey properties in SECTION_A.
Unlike SECTION_C (lines 170-193) which includes stateKey for each field, SECTION_A lacks this property. This forces SectionA.jsx to maintain a separate fieldToStateKey mapping (lines 13-17 in SectionA.jsx), creating duplication and potential for errors.
For consistency with SECTION_C and to eliminate the hardcoded mapping in SectionA.jsx, add stateKey to each field:
export const SECTION_A = {
a1: {
id: 'a1',
label: 'A1',
text: 'Specify the numerical result being assessed',
placeholder: 'e.g., OR = 1.5 (95% CI: 1.2-1.9)',
type: 'textarea',
+ stateKey: 'numericalResult',
},
a2: {
id: 'a2',
label: 'A2',
text: 'Provide further details about this result (for example, location in the study report, reason it was chosen)',
optional: true,
placeholder: 'e.g., Table 3, primary outcome analysis',
type: 'textarea',
+ stateKey: 'furtherDetails',
},
a3: {
id: 'a3',
label: 'A3',
text: 'Specify the outcome to which this result relates',
placeholder: 'e.g., All-cause mortality at 12 months',
type: 'textarea',
+ stateKey: 'outcome',
},
};Then update SectionA.jsx to remove the hardcoded mapping (see comment in SectionA.jsx review).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Section A: Specify the result being assessed for risk of bias | |
| export const SECTION_A = { | |
| a1: { | |
| id: 'a1', | |
| label: 'A1', | |
| text: 'Specify the numerical result being assessed', | |
| placeholder: 'e.g., OR = 1.5 (95% CI: 1.2-1.9)', | |
| type: 'textarea', | |
| }, | |
| a2: { | |
| id: 'a2', | |
| label: 'A2', | |
| text: 'Provide further details about this result (for example, location in the study report, reason it was chosen)', | |
| optional: true, | |
| placeholder: 'e.g., Table 3, primary outcome analysis', | |
| type: 'textarea', | |
| }, | |
| a3: { | |
| id: 'a3', | |
| label: 'A3', | |
| text: 'Specify the outcome to which this result relates', | |
| placeholder: 'e.g., All-cause mortality at 12 months', | |
| type: 'textarea', | |
| }, | |
| }; | |
| // Section A: Specify the result being assessed for risk of bias | |
| export const SECTION_A = { | |
| a1: { | |
| id: 'a1', | |
| label: 'A1', | |
| text: 'Specify the numerical result being assessed', | |
| placeholder: 'e.g., OR = 1.5 (95% CI: 1.2-1.9)', | |
| type: 'textarea', | |
| stateKey: 'numericalResult', | |
| }, | |
| a2: { | |
| id: 'a2', | |
| label: 'A2', | |
| text: 'Provide further details about this result (for example, location in the study report, reason it was chosen)', | |
| optional: true, | |
| placeholder: 'e.g., Table 3, primary outcome analysis', | |
| type: 'textarea', | |
| stateKey: 'furtherDetails', | |
| }, | |
| a3: { | |
| id: 'a3', | |
| label: 'A3', | |
| text: 'Specify the outcome to which this result relates', | |
| placeholder: 'e.g., All-cause mortality at 12 months', | |
| type: 'textarea', | |
| stateKey: 'outcome', | |
| }, | |
| }; |
🤖 Prompt for AI Agents
In packages/web/src/ROBINS-I/checklist-map.js around lines 119 to 143, SECTION_A
entries are missing stateKey properties (unlike SECTION_C), causing SectionA.jsx
to maintain a separate hardcoded field-to-state mapping; add a stateKey to each
a1, a2, and a3 entry (matching the keys used in component state) so the map
includes { id, label, text, placeholder, type, stateKey } and then remove the
hardcoded fieldToStateKey mapping from SectionA.jsx so the component reads
stateKey directly from the checklist map.
improve ux for robins and add missing sections
Summary by CodeRabbit
New Features
Improvements
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.