Repository navigation
fix: allow reactive variables as range steps - #7914
Open
peterolkhov wants to merge 2 commits into
Open
peterolkhov wants to merge 2 commits into
peterolkhov wants to merge 2 commits into
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAllows reactive range steps while keeping the default stride of one for omitted or zero steps.
No new actionable issues found. Reviews (2) · Last reviewed commit: "fix: allow reactive variables as range s..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
This branch has not been deployed
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.
rx.Var.range(0, 10, State.step)passes the input validation, then raisesVarTypeErrorwhile constructingforeach/grid becausestep or 1evaluates the reactive variable as a Python boolean.Default only when the step is
None, preserving the supplied variable and its state dependencies. Added a parameterized regression for public/array constructors, state/literal variables, both stride directions and an empty range. Each case constructs the real grid and compares the generated JavaScript result with Pythonrange. Includes areflex-basenews fragment.All Submissions
Type of change
Changes To Core Features
Zero steps keep the existing stride-of-one fallback, including state values that change to zero after construction.
Validation: 604 affected tests passed, affected Pyright has zero errors, pinned Ruff check/format pass across the repository, and the genuine changed-file pre-commit command passes.
The full unit/coverage and browser suites were not run. The earlier all-files hook run had baseline type errors; a fresh full all-files run was not repeated for this revision. The required changed-file gate passes, including its always-run type checks.