Skip to content

add combobox#1389

Merged
joshunrau merged 8 commits into
DouglasNeuroInformatics:mainfrom
joshunrau:dev
Jul 2, 2026
Merged

add combobox#1389
joshunrau merged 8 commits into
DouglasNeuroInformatics:mainfrom
joshunrau:dev

Conversation

@joshunrau

@joshunrau joshunrau commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator
  • add combobox option for string form fields
  • disable actions (print, copy, download) when completing instruments on the gateway

Summary by CodeRabbit

  • New Features

    • Added support for a new combobox-style field in forms, including validation and translation handling.
    • Added an option to hide summary action buttons like copy, download, and print in instrument summaries.
  • Bug Fixes

    • Updated the challenge flow to use a slightly lower difficulty level.
  • Chores

    • Bumped package and workspace versions, and refreshed dependency versions across the workspace.

@joshunrau joshunrau merged commit 269db03 into DouglasNeuroInformatics:main Jul 2, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 77532fb4-3396-4f6c-8d21-9a3f2b69d31f

📥 Commits

Reviewing files that changed from the base of the PR and between 38f3f36 and 82b0ae9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • apps/gateway/src/Root.tsx
  • apps/gateway/src/routers/cap.router.ts
  • apps/playground/src/instruments/examples/form/Form-Reference/index.ts
  • package.json
  • packages/instrument-bundler/package.json
  • packages/instrument-guidelines/package.json
  • packages/instrument-utils/src/translate.ts
  • packages/playground-url/package.json
  • packages/react-core/src/components/InstrumentRenderer/InstrumentRenderer.tsx
  • packages/react-core/src/components/InstrumentRenderer/ScalarInstrumentRenderer.tsx
  • packages/react-core/src/components/InstrumentSummary/InstrumentSummary.tsx
  • packages/schemas/src/instrument/instrument.form.ts
  • packages/serve-instrument/package.json
  • pnpm-workspace.yaml
  • runtime/v1/package.json

Walkthrough

This PR adds a "combobox" variant for string/number scalar fields (schema, translation logic, and a playground example), introduces a disableSummaryActions/disableActions prop to conditionally hide the InstrumentSummary toolbar, changes cap challenge difficulty from 5 to 4, and bumps several package versions and a workspace catalog dependency.

Changes

Combobox Variant and Summary Actions

Layer / File(s) Summary
Combobox schema and translation logic
packages/schemas/src/instrument/instrument.form.ts, packages/instrument-utils/src/translate.ts
Adds 'combobox' to the allowed string field variant enum and extends translateScalarField pattern matching to handle combobox for number/string fields alongside existing radio/select.
Playground combobox example
apps/playground/src/instruments/examples/form/Form-Reference/index.ts
Adds a stringCombobox field with options a/b/c and a matching z.enum validator.
Disable summary actions wiring
packages/react-core/src/components/InstrumentRenderer/InstrumentRenderer.tsx, packages/react-core/src/components/InstrumentRenderer/ScalarInstrumentRenderer.tsx, packages/react-core/src/components/InstrumentSummary/InstrumentSummary.tsx, apps/gateway/src/Root.tsx
Adds disableSummaryActions/disableActions optional props threaded from Root.tsx through InstrumentRenderer and ScalarInstrumentRenderer into InstrumentSummary, which conditionally omits the copy/download/print toolbar.
Cap challenge difficulty and version bumps
apps/gateway/src/routers/cap.router.ts, package.json, packages/instrument-bundler/package.json, packages/instrument-guidelines/package.json, packages/playground-url/package.json, packages/serve-instrument/package.json, runtime/v1/package.json, pnpm-workspace.yaml
Changes challengeDifficulty from 5 to 4, bumps package versions from 2.0.0 to 2.1.0, and updates catalog versions for @douglasneuroinformatics/libui and @douglasneuroinformatics/libui-form-types.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Root
    participant InstrumentRenderer
    participant ScalarInstrumentRenderer
    participant InstrumentSummary

    Root->>InstrumentRenderer: render with disableSummaryActions=true
    InstrumentRenderer->>ScalarInstrumentRenderer: pass disableSummaryActions
    ScalarInstrumentRenderer->>InstrumentSummary: pass disableActions
    alt disableActions is true
        InstrumentSummary-->>InstrumentSummary: skip rendering copy/download/print toolbar
    else disableActions is false
        InstrumentSummary-->>InstrumentSummary: render toolbar
    end
Loading

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant