Editable defaults for optional args in LET to LAMBDA#216
Merged
Conversation
When an input is marked Optional in the LET to LAMBDA dialog, the generated LAMBDA previously always defaulted it to the binding's original RHS. Authors can now edit that default inline: the read-only RHS preview becomes an editable text box (pre-filled with the original RHS) when Optional is ticked. - InputChoice gains an optional DefaultExpression; the builder uses it for the IF(ISOMITTED(...)) wrapper, falling back to the original RHS when blank so existing behaviour and tests are unchanged. - User-typed defaults get the same ApplyRenames + AbsolutizeCellRefs treatment as the original RHS (a typed A1 becomes $A$1). - Save is disabled while an optional row has a blank default. Closes #215 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
@
Summary
In the LET to LAMBDA dialog, ticking Optional on an input previously fixed its default to the bindings original RHS — authors had no way to change it. This lets them edit the default inline.
default: …preview turns into an editable text box, pre-filled with the original RHS. Unticking reverts to the read-only preview.InputChoicegains an optionalDefaultExpression; the builder uses it for theIF(ISOMITTED(…))wrapper and falls back to the original RHS when blank, so existing behaviour and the full builder test suite are unchanged.ApplyRenames+AbsolutizeCellRefstreatment as the original RHS (a typedA1becomes$A$1).Files
addin/lambda-boss/LetToLambdaBuilder.cs—InputChoice.DefaultExpression+ wrapper uses it.addin/lambda-boss/UI/LetToLambdaWindow.xaml(.cs)— editable default box,ShowRhsPreview, blank-default validation.addin/lambda-boss.Tests/LetToLambdaBuilderTests.cs— 4 new cases (typed default, absolutized ref, blank fallback, rename-through-default).Testing
dotnet build addin/lambda-boss.slnx— clean, 0 warnings.dotnet test …/lambda-boss.Tests— 994 passed, 0 failed.Closes #215
🤖 Generated with Claude Code
@