Skip to content

🎨 Palette: Visual Studio Search Box Placeholder & A11y#300

Open
AhmmedSamier wants to merge 1 commit intomasterfrom
palette-wpf-search-placeholder-18307850430843840503
Open

🎨 Palette: Visual Studio Search Box Placeholder & A11y#300
AhmmedSamier wants to merge 1 commit intomasterfrom
palette-wpf-search-placeholder-18307850430843840503

Conversation

@AhmmedSamier
Copy link
Owner

@AhmmedSamier AhmmedSamier commented Mar 21, 2026

🎨 Palette: Visual Studio Search Box Placeholder & A11y

💡 What:

  • Added a visual placeholder/watermark ("Search for classes, symbols, files, text, or endpoints") to the Search Control's TextBox.
  • Added AutomationProperties.Name="Indexing progress" to the ProgressBar used for background indexing status.

🎯 Why:

  • WPF TextBox elements lack a built-in Placeholder property, making it non-obvious to users what queries the search bar supports when empty. Adding a styled TextBlock overlay greatly improves discoverability.
  • Progress bars that convey background state must have explicit AutomationProperties.Name attributes, otherwise they remain invisible to screen readers, denying those users critical system state information.

Accessibility:

  • Ensures screen readers can announce the purpose of the indexing progress bar.
  • The new placeholder TextBlock correctly sets 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

    • Added visible placeholder text to the search bar that disappears when you start typing.
  • Accessibility

    • Improved screen reader support for the indexing progress indicator with proper labeling.

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>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

Added 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

Cohort / File(s) Summary
Documentation & Accessibility Guidance
.Jules/palette.md
Added entry documenting WPF placeholder implementation pattern using overlaid TextBlock with DataTrigger, and specified setting AutomationProperties.Name on ProgressBar for screen reader accessibility.
Search Control UI & Accessibility
visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml
Replaced TextBox placeholder area with Grid containing overlaid TextBlock (visibility controlled by DataTriggers on TextBox text state) and added AutomationProperties.Name="Indexing progress" to ProgressBar.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • DeepLens#284: Makes identical changes to SearchControl.xaml—adding TextBlock-based placeholder with DataTrigger visibility and ProgressBar accessibility labeling.
  • DeepLens#277: Implements the same TextBlock placeholder overlay for search input and adds ProgressBar AutomationProperties.Name.
  • DeepLens#263: Modifies SearchControl.xaml to add accessibility metadata, including AutomationProperties.Name to UI elements.

Poem

🐰 A placeholder now blooms with grace,
TextBlock whispers in the right place,
DataTriggers dance when textboxes wake,
Screen readers rejoice, for clarity's sake!
Accessibility's clover field, we partake! 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title includes an emoji and uses vague abbreviations ('Palette', 'A11y') that may not clearly convey the core change to someone unfamiliar with the project context. Consider revising to a more descriptive title without emojis, such as 'Add search box placeholder and accessibility labels' for better clarity in commit history.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-wpf-search-placeholder-18307850430843840503

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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.Text and TextBox.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

📥 Commits

Reviewing files that changed from the base of the PR and between b2c343b and 146c0aa.

📒 Files selected for processing (2)
  • .Jules/palette.md
  • visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant