fix(ui): make Learn more text selectable/copyable - #55
Merged
Conversation
The Learn more expanders rendered their content (including the verify / apply / reverse PowerShell commands) in a plain TextBlock, which WPF doesn't allow you to select or copy. Render it instead in a read-only, chrome-free TextBox via a shared CopyableLearnMoreText style — looks identical to plain text but supports click-drag selection, Ctrl+A/Ctrl+C, and right-click Copy, so users can paste the commands into a terminal. The custom template strips all TextBox chrome (border, background, focus underline) and disables its scrollbars so it doesn't swallow mouse-wheel scrolling inside the settings ScrollViewer. Applied to all 8 Learn more expanders (one per tab's row template). Binding is Mode=OneWay (the source is a read-only property; avoids the TwoWay-to-readonly pitfall). 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.
Problem
In the Settings window, the per-setting Learn more expanders list copy-pasteable PowerShell commands (verify / apply / reverse), but the content was rendered in a plain
TextBlock— which WPF does not allow you to select or copy. So there was no way to actually grab the commands and run them.Fix
Render the Learn more content in a read-only, chrome-free
TextBoxvia a sharedCopyableLearnMoreTextstyle. It looks identical to plain text but supports click-drag selection,Ctrl+A/Ctrl+C, and right-click → Copy.ScrollViewer.Mode=OneWay(the source is a read-only property — avoids the TwoWay-to-readonly pitfall noted in the project's working notes).Testing
dotnet build(incl. forced rebuild so the XAML markup compiler validated the new template) — clean, 0 warnings (TreatWarningsAsErrors).dotnet test— 553 passed, 0 failed.🤖 Generated with Claude Code