fix(NumberBox): broken primary return value #47
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mupen64/ugui!47
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-broken-numberbox-return-value"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes
numberboxhaving a brokenprimaryreturn value.Pull request overview
Fixes
ugui.registry.numberbox.logicto return its primary signal via the standardControlReturnValue.primaryfield (instead of a non-standardvaluefield), aligning numberbox with the rest of the control registry contract.Changes:
logicreturn table to useprimary = data.value.Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
src/ugui/controls/numberbox.luaControlReturnValueshape by returning the numberbox value underprimary.test/numberbox.lua💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@ -107,3 +107,4 @@primary = data.value,meta = { signal_change = data.signal_change },}end,The numberbox logic return value now exposes
primary, but there is no regression test asserting thatugui.control(..., 'numberbox')returns a table withprimaryset to the updated value (and notnil). Please add a focused test covering this behavior so the bug fixed by this PR is prevented from recurring.This test file replaces two concrete tests with a placeholder test that performs no actions/assertions (TODO only). This removes coverage for numberbox interactions and also doesn't validate the PR's intended fix (the
primaryreturn value). Please restore the previous assertions or implement a new deterministic test that at least exercisesugui.control(..., 'numberbox')and asserts the returnedprimaryvalue changes as expected.