Skip to content

[Windows] Fixed the text and icon color issues in the DatePicker when hovering over it. #27147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

Ahamed-Ali
Copy link
Contributor

Issue

  • When the background color of the DatePicker is set to black and the text and icon colors are white, the text and icon become invisible when hovering over the DatePicker.

Root Cause of the issue

  • When the mouse hovers over the DatePicker, the default PointerOver color set from WinUI causes the text and icon colors to blend into the black background, making them invisible.

Description of Change

  • I resolved the issue by assigning the appropriate resource keys to ensure the correct colors are applied to both the DatePicker text and icon.

Issues Fixed

Fixes #22987

Test Case

  • Since this issue is related to hovering, a test case cannot be written.

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
HoveringIssue.mp4
HoveringFixed.mp4

Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 15, 2025
@Ahamed-Ali Ahamed-Ali changed the title Fixed the text and icon color issues in the DatePicker when hovering over it. [Windows] Fixed the text and icon color issues in the DatePicker when hovering over it. Jan 15, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 15, 2025
@Ahamed-Ali Ahamed-Ali marked this pull request as ready for review January 15, 2025 13:37
@Ahamed-Ali Ahamed-Ali requested a review from a team as a code owner January 15, 2025 13:37
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Could you include an UITest? I can include something like a MovePointer and MovePointerToCoordinate methods.

@Ahamed-Ali
Copy link
Contributor Author

Could you include an UITest? I can include something like a MovePointer and MovePointerToCoordinate methods.

I have included the test sample and test case. Could you please review them and let me know if you have any concerns? @jsuarezruiz

{
App.WaitForElement("Label");

//need to include something like a MovePointer and MovePointerToCoordinate methods for hovering.
Copy link
Contributor

Choose a reason for hiding this comment

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

Have done tests with different approaches:

Using the Hover command https://github.com/appium/appium-windows-driver?tab=readme-ov-file#windows-hover is not available in the used version:

 An exception of type 'System.NotImplementedException' occurred in WebDriver.dll but was not handled in user code
Unknown windows command 'hover'. Only startRecordingScreen,stopRecordingScreen,deleteFile,deleteFolder commands are supported.

Trying to move the cursor fails because using PointerKind.Mouse:
OpenQA.Selenium.WebDriverException: 'Currently only pen and touch pointer input source types are supported'

Can give a way to move the cursor using Win32, but want to test more options.

So, for now, can avoid the test, or use a Device Test to verify the color in the added resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your response. I have looked into the device test for the DatePicker hovering test case but couldn't find any relevant references for it. Could you please share any related references for hovering testcase if available, or can we avoid this test for now? @jsuarezruiz

Copy link
Member

Choose a reason for hiding this comment

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

I think @mattleibow has a PR here that provides this behavior

#27477

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR5 milestone Jan 27, 2025
Foda
Foda previously approved these changes Jan 27, 2025
@Foda
Copy link
Member

Foda commented Jan 29, 2025

Looks like a legit test fail

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

App.WaitForElement("Label");

//need to include something like a MovePointer and MovePointerToCoordinate methods for hovering.

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 on Windows:
image
Could you commit it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The image is incorrect. I have restricted the test for now. Once implementation PR #27477 is merged, we can add MoveCursor and enable the test. @jsuarezruiz

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@github-project-automation github-project-automation bot moved this from Ready To Review to Changes Requested in MAUI SDK Ongoing Mar 4, 2025
@jsuarezruiz
Copy link
Contributor

/rebase

@PureWeen PureWeen moved this from Changes Requested to Ready To Review in MAUI SDK Ongoing Mar 18, 2025
@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

Added Windows Device Test to validate the changes.
image

@jsuarezruiz jsuarezruiz changed the base branch from main to inflight/current March 21, 2025 07:08
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Mar 21, 2025
@jsuarezruiz
Copy link
Contributor

Retarget to the inflight branch.

@rmarinho rmarinho merged commit 67db5d5 into dotnet:inflight/current Mar 21, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Mar 21, 2025
anandhan-rajagopal pushed a commit to anandhan-rajagopal/maui that referenced this pull request Mar 26, 2025
… hovering over it. (dotnet#27147)

* Fixed the Hovering issue of text and icon color in the DatePicker in windows.

* Included the UI test sample and test case

* Modified the test

* Added Device Test

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
anandhan-rajagopal pushed a commit to anandhan-rajagopal/maui that referenced this pull request Mar 26, 2025
… hovering over it. (dotnet#27147)

* Fixed the Hovering issue of text and icon color in the DatePicker in windows.

* Included the UI test sample and test case

* Modified the test

* Added Device Test

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
PureWeen pushed a commit that referenced this pull request Mar 26, 2025
… hovering over it. (#27147)

* Fixed the Hovering issue of text and icon color in the DatePicker in windows.

* Included the UI test sample and test case

* Modified the test

* Added Device Test

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
PureWeen pushed a commit that referenced this pull request Mar 26, 2025
… hovering over it. (#27147)

* Fixed the Hovering issue of text and icon color in the DatePicker in windows.

* Included the UI test sample and test case

* Modified the test

* Added Device Test

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
github-actions bot pushed a commit that referenced this pull request Mar 27, 2025
… hovering over it. (#27147)

* Fixed the Hovering issue of text and icon color in the DatePicker in windows.

* Included the UI test sample and test case

* Modified the test

* Added Device Test

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

DatePicker Color Icon
6 participants