Fixes #5517. DropDownList dropped list uses Menu scheme for distinct background - #5545
Merged
Conversation
…background The expanded (dropped) DropDownList list shared its SuperView's background attribute, making the open list blend into surrounding content. A `GettingAttributeForRole` handler forced the popover's Normal attribute to match the most-focused view — reintroducing the bug the original implementation avoided. Resolve the dropped list's scheme to the Menu scheme (consistent with Menu, StatusBar, and PopupAutocomplete) so its Normal attribute differs from the SuperView by construction and the list visibly "floats". Adds a regression test asserting the dropped list's Normal background differs from its SuperView's. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…5517) Re-recorded via docfx/scripts/generate-views-doc.ps1's tuirec + OutputView pipeline (built against the fixed library). The dropped list now renders with the Menu scheme's LightBlue background, clearly floating over the host window. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a visual regression where a DropDownList’s dropped (expanded) list popup blended into its SuperView by ensuring the dropped list resolves to the Menu scheme, giving it a distinct background like other floating/popover UI in Terminal.Gui.
Changes:
- Set the dropped list
ListView’sSchemeNametoSchemes.Menuand remove theGettingAttributeForRoleworkaround. - Add a regression test asserting the dropped list background differs from its
SuperViewwhen expanded.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Terminal.Gui/Views/DropDownList.cs | Makes the dropped list “float” by assigning the Menu scheme and removing the prior attribute-forcing handler. |
| Tests/UnitTestsParallelizable/Views/DropDownListTests.cs | Adds a regression test covering distinct background behavior for the expanded list. |
Ran docfx metadata + generate-views-doc.ps1 -SkipGifs (reusing existing gifs, including the newly recorded DropDownList.gif). Syncs the ImageView description with its current XML doc summary (Sixel/Kitty raster modes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Full re-run of docfx/scripts/generate-views-doc.ps1 (docfx metadata + tuirec/OutputView recording) against the fixed library, refreshing every built-in view GIF in docfx/images/views/. The DropDownList GIF shows the dropped list floating with the Menu scheme's distinct background. Abstract/base types (LinearRangeViewBase, RunnableWrapper, SelectorBase) have no GIF as before — they cannot be instantiated for recording. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…5517) The new regression test was inserted between the `FindDropDownPopover` helper and its `// Helper to find the DropDownList popover` doc comment, orphaning the comment above the test. Move the helper comment back directly above the helper so it documents the method again; the test keeps its own AI-author marker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 29, 2026
This was referenced Jul 6, 2026
This was referenced Jul 13, 2026
7 tasks
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 #5517
Problem
When a
DropDownListis dropped (expanded), the open list popup shared itsSuperView's background attribute, so the open list blended into the surrounding content and its bounds were hard to see.This was a regression. The original implementation gave the dropped list a distinct background, but commit
c6d67e362replaced that with aGettingAttributeForRolehandler that forced the popover'sNormalattribute to matchApp.TopRunnableView.MostFocused— i.e. the SuperView — reintroducing the bug.Fix
Resolve the dropped list's scheme to the Menu scheme — the same approach used by
Menu,StatusBar, andPopupAutocompletefor popover/floating views. ItsNormalattribute now differs from the SuperView by construction, so the open list visibly "floats".The
GettingAttributeForRoleworkaround is removed.Test
Adds
DroppedList_UsesBackgroundDistinctFromSuperViewtoUnitTestsParallelizable, which opens aDropDownListand asserts the dropped list'sNormalbackground!=its SuperView's. Verified it fails against the unfixed source and passes with the fix. All 50DropDownListTestspass.🤖 Generated with Claude Code