Skip to content
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

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
Copy link
Member

Foda commented Jan 29, 2025

Looks like a legit test fail

@jsuarezruiz
Copy link
Contributor

/rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
Status: Ready To Review
Development

Successfully merging this pull request may close these issues.

DatePicker Color Icon
5 participants