Skip to content

fix(ui): exclude Measurement Type from template Set-Variables (#513) - #813

Open
skearnes wants to merge 1 commit into
mainfrom
fix/513-measurement-type-not-variable
Open

fix(ui): exclude Measurement Type from template Set-Variables (#513)#813
skearnes wants to merge 1 commit into
mainfrom
fix/513-measurement-type-not-variable

Conversation

@skearnes

@skearnes skearnes commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #513.

A measurement's Type select drives which sub-fields render, so it isn't a templatable value. This adds cannotBeVariable: true to its wrapperConfig (reactionMeasurements.model.ts) so that in templates it shows a plain label with no "Set Variables" link — matching the existing opt-out already used on Component Identifier Type, Analysis name, and "Based on".

tsc -b + lint + measurements unit tests green.

🤖 Generated with Claude Code

Greptile Summary

This PR fixes a template UI bug where the measurement Type dropdown incorrectly offered a "Set Variables" link, even though its value controls which sub-fields are rendered and therefore cannot be left variable. The fix adds cannotBeVariable: true to the field's wrapperConfig, which causes ReactionValueLabelWrapper to render a plain ViewOnlyLabelComponent instead of the interactive template control.

  • The one-line change exactly mirrors the existing opt-outs already applied to Component Identifier Type (reactionComponentIdentifiers.model.ts), Analysis name (reactionAnalyses.models.ts), and "Based on" (MeasurementsBasedOn.tsx).
  • No logic, rendering path, or type definition is altered; only the model configuration for this single field changes.

Confidence Score: 5/5

Safe to merge — the change is a single-flag addition to an existing configuration pattern with no side-effects outside template mode.

The change is one cannotBeVariable: true flag on a field config object, matching an identical pattern already used in three other places in the same codebase. The consuming component (ReactionValueLabelWrapper) only checks this flag when isTemplate is true, so non-template rendering is entirely unaffected. There are no new code paths, no conditional logic changes, and no type mismatches to worry about.

No files require special attention.

Important Files Changed

Filename Overview
ui/src/features/reactions/ReactionEntities/entityFormConfiguration/measurements/reactionMeasurements.model.ts Adds cannotBeVariable: true to the measurement type field's wrapperConfig, preventing the "Set Variables" link from appearing in template mode — consistent with identical opt-outs on Component Identifier Type, Analysis name, and "Based on".

Reviews (1): Last reviewed commit: "fix(ui): exclude Measurement Type from t..." | Re-trigger Greptile

A measurement's Type select drives which sub-fields appear; it isn't a
templatable value. Add cannotBeVariable to its wrapperConfig so templates
render a plain label with no "Set Variables" link, matching the existing
opt-out on Component Identifier Type and Analysis name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pulumi

pulumi Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Pulumi Neo didn't review this pull request: no Pulumi preview ran for it. Agentic reviews require a preview of the affected stacks (for example from your CI's pulumi preview).

@sonarqubecloud

Copy link
Copy Markdown

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.

Exclude Measurement Type from Set Variables options.

1 participant