Skip to content

Show percent operator only for number variables#73

Merged
kindermax merged 1 commit into
mainfrom
claude/friendly-keller-cbf639
Jun 12, 2026
Merged

Show percent operator only for number variables#73
kindermax merged 1 commit into
mainfrom
claude/friendly-keller-cbf639

Conversation

@kindermax

Copy link
Copy Markdown
Contributor

What changed

Removed Operator.PERCENT from the STRING type's operator list in ui/src/Dashboard/constants.js, so the percent operator is now offered only for NUMBER variables.

Why

The percent operator only makes sense for integer values, but the operator dropdown offered it for string variables as well. Since all operator dropdowns (Check, ValueCheck, Flag, Value) build their options from the single TYPES map, this one-line change covers the whole UI.

Notes for reviewers

Existing checks already saved with percent on a string variable keep working server-side, but their operator dropdown will display the raw value 7 instead of the "percent" label since the option is no longer in the list.

The percent operator was offered for string variables in the operator
dropdown, but it only makes sense for integer values. Remove it from
the STRING type's operator list so it is available only for NUMBER.
@kindermax
kindermax merged commit 8cd67e4 into main Jun 12, 2026
1 check passed
@kindermax
kindermax deleted the claude/friendly-keller-cbf639 branch June 12, 2026 12:30
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