KEMBAR78
[iOS] SearchBar placeholder color is not updating on theme change - fix by kubaflo · Pull Request #30597 · dotnet/maui · GitHub
Skip to content

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jul 13, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Before After
Screen.Recording.2025-07-13.at.17.06.53.mov
Screen.Recording.2025-07-13.at.17.04.48.mov

Issues Fixed

Fixes #30596

@Copilot Copilot AI review requested due to automatic review settings July 13, 2025 15:14
@kubaflo kubaflo requested a review from a team as a code owner July 13, 2025 15:14
@kubaflo kubaflo self-assigned this Jul 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jul 13, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the iOS SearchBar so that its placeholder color properly updates when the app’s theme changes by refactoring how the attributed placeholder is generated.

  • Replace the old null-coalescing and multiple NSAttributedString calls with pattern matching on PlaceholderColor
  • Use the platform’s default placeholder color (ColorExtensions.PlaceholderColor) as a direct UIColor fallback
  • Streamline the attributed placeholder assignment while preserving character spacing

@kubaflo kubaflo force-pushed the fix-30596 branch 2 times, most recently from 9fa97f2 to b14765b Compare July 13, 2025 15:27
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

{
App.WaitForElement("changeThemeButton");
App.Tap("changeThemeButton");
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshot, running a build.

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Jul 17, 2025

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis
Copy link
Member

/rebase

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jfversluis jfversluis changed the base branch from main to inflight/current August 25, 2025 12:13
@jfversluis jfversluis added this to the .NET 9 SR12 milestone Aug 25, 2025
@jfversluis jfversluis merged commit ab5ee64 into dotnet:inflight/current Aug 25, 2025
76 of 78 checks passed
PureWeen pushed a commit that referenced this pull request Sep 5, 2025
Added a UI Test

Update Issue30597.cs

Update SearchBarExtensions.cs

Added snapshots
@Copilot Copilot AI mentioned this pull request Sep 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-searchbar SearchBar control community ✨ Community Contribution platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] SearchBar placeholder color is not updating on theme change

3 participants