Repository navigation
fix(lstsv): autocomplete dropdown width follows the selected entry - #236
Merged
Merged
Conversation
…idth_entry) Fixes #235. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Fixes #235.
LimeSurvey's
bootstrap_dropdowntheme rendersdata-width='auto'whilewidth_entryis unset, so the closed autocomplete dropdown is as wide as the longest option (885px for 12,243 municipality names; the page scrolls sideways on phones).appearance=autocompletenow also emitswidth_entry=true: the button is 176px unselected and 366px with a long name selected (LimeSurvey 6.17.8, 390px viewport). The open menu is still as wide as the longest option; that needs theme CSS and is out of scope.Reverse path: the registry's
lsQuestionThemegets anemitOnlyAttributesmap next toattributes. Both are written to the TSV, but onlyattributes(show_search) identify the appearance inthemedAppearanceOf. TSVs made with 0.11.0 have nowidth_entryand still read back asautocomplete.width_entryis also added toATTRIBUTE_COLUMNS;src/generatedis regenerated withuv run codegen.Before:
After:
Tests
width_entry=true; a 0.11.0-style TSV withoutwidth_entryreads back asautocomplete.tests/live/limesurvey/test_lstsv_attributes.pyalso assertswidth_entry == "true"(not run, needs the LimeSurvey docker setup).npm test: 108 files and 1766 tests pass.npm run validateis clean.🤖 Generated with Claude Code