🎨 Palette: Visual Studio Search Box Placeholder & A11y#300
🎨 Palette: Visual Studio Search Box Placeholder & A11y#300AhmmedSamier wants to merge 1 commit intomasterfrom
Conversation
Adds a visual placeholder to the Search TextBox in `SearchControl.xaml` via a Watermark/TextBlock to improve discoverability. Binds visibility to the text content via DataTriggers. Also adds `AutomationProperties.Name` to the Indexing ProgressBar to ensure screen readers properly announce background indexing progress. Co-authored-by: AhmmedSamier <17784876+AhmmedSamier@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthroughAdded WPF accessibility and placeholder guidance to the palette documentation. Updated SearchControl.xaml to implement a placeholder TextBlock overlay for the search TextBox with visibility tied to text input via DataTriggers, and added accessibility labels to the ProgressBar for screen reader exposure. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml (1)
206-238: Centralize placeholder text to avoid string drift and ease localization.The same literal is duplicated in
TextBlock.TextandTextBox.ToolTip. Extract it to a shared resource and reference it in both places.♻️ Suggested refactor
<UserControl.Resources> + <x:String x:Key="SearchPlaceholderText">Search for classes, symbols, files, text, or endpoints</x:String> ... </UserControl.Resources> @@ -<TextBlock +<TextBlock IsHitTestVisible="False" - Text="Search for classes, symbols, files, text, or endpoints" + Text="{StaticResource SearchPlaceholderText}" VerticalAlignment="Center" @@ <TextBox Name="SearchTextBox" @@ - ToolTip="Search for classes, symbols, files, text, or endpoints" /> + ToolTip="{StaticResource SearchPlaceholderText}" />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml` around lines 206 - 238, Extract the duplicated literal "Search for classes, symbols, files, text, or endpoints" into a single resource (e.g., add a resource key like SearchPlaceholderText in the control's Resources or a shared ResourceDictionary) and replace the inline usages in the XAML: set the TextBlock.Text (the placeholder TextBlock) and the TextBox.ToolTip (on SearchTextBox) to reference that resource (using StaticResource or DynamicResource as appropriate) so both controls use the same keyed string and avoid string drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml`:
- Around line 206-238: Extract the duplicated literal "Search for classes,
symbols, files, text, or endpoints" into a single resource (e.g., add a resource
key like SearchPlaceholderText in the control's Resources or a shared
ResourceDictionary) and replace the inline usages in the XAML: set the
TextBlock.Text (the placeholder TextBlock) and the TextBox.ToolTip (on
SearchTextBox) to reference that resource (using StaticResource or
DynamicResource as appropriate) so both controls use the same keyed string and
avoid string drift.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 787c71e0-9d67-4cb8-a0d1-bea35fbfed06
📒 Files selected for processing (2)
.Jules/palette.mdvisual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml
🎨 Palette: Visual Studio Search Box Placeholder & A11y
💡 What:
TextBox.AutomationProperties.Name="Indexing progress"to theProgressBarused for background indexing status.🎯 Why:
TextBoxelements lack a built-inPlaceholderproperty, making it non-obvious to users what queries the search bar supports when empty. Adding a styledTextBlockoverlay greatly improves discoverability.AutomationProperties.Nameattributes, otherwise they remain invisible to screen readers, denying those users critical system state information.♿ Accessibility:
IsHitTestVisible="False"to prevent intercepting clicks meant for the search input. It also uses{DynamicResource {x:Static vsshell:VsBrushes.GrayTextKey}}to ensure the placeholder text correctly follows Visual Studio Light/Dark theme settings with sufficient contrast.PR created automatically by Jules for task 18307850430843840503 started by @AhmmedSamier
Summary by CodeRabbit
New Features
Accessibility