fix(ui): exclude Measurement Type from template Set-Variables (#513) - #813
Open
skearnes wants to merge 1 commit into
Open
fix(ui): exclude Measurement Type from template Set-Variables (#513)#813skearnes wants to merge 1 commit into
skearnes wants to merge 1 commit into
Conversation
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>
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 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #513.
A measurement's Type select drives which sub-fields render, so it isn't a templatable value. This adds
cannotBeVariable: trueto itswrapperConfig(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: trueto the field'swrapperConfig, which causesReactionValueLabelWrapperto render a plainViewOnlyLabelComponentinstead of the interactive template control.reactionComponentIdentifiers.model.ts), Analysis name (reactionAnalyses.models.ts), and "Based on" (MeasurementsBasedOn.tsx).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: trueflag 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 whenisTemplateis 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
cannotBeVariable: trueto the measurementtypefield'swrapperConfig, 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