Repository navigation
Conversation
Closes XLSForm#767 Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Closes #767
Why is this the best possible solution? Were any other approaches considered?
Uses the same
aliases.yes_nolookup that #766 added forclient_editable, applied in the same place inxls2json.py.The difference is that
auto_sendandauto_deletehave three states, not two. They can be unset,trueorfalse, and an explicitfalseoverrides the client's own setting. So a false alias must still outputorx:auto-send="false". It can't be converted to a Python bool and dropped the wayclient_editable="false"is. Aliases are converted to the strings"true"/"false".Values that aren't recognised as aliases are passed through unchanged, as before, so this doesn't break any existing form. Raising an error or warning for them could be a follow-up, if you want that.
Boolean cells from Excel already came through as
true/false. This change affects text values likeyes,NoandTRUE().What are the regression risks?
Low. The literal
trueandfalsevalues produce the same output as before. Only the aliases listed inaliases.yes_nochange, from being copied into the XForm as typed (e.g.orx:auto-send="yes", which clients don't recognise) totrueorfalse.Does this change require updates to documentation? If so, please file an issue here and include the link below.
Possibly a short note that the settings accept yes/no-style values. I'm happy to file that if you'd like one.
Before submitting this PR, please make sure you have:
testspython -m unittestand verified all tests passruff format pyxform testsandruff check pyxform teststo lint code🤖 Generated with Claude Code