Skip to content

Make PointerOver to have higher priority than Focused state#19812

Closed
MartyIX wants to merge 4 commits intodotnet:mainfrom
MartyIX:feature/2024-01-10-PointerOver-preference-over-focus
Closed

Make PointerOver to have higher priority than Focused state#19812
MartyIX wants to merge 4 commits intodotnet:mainfrom
MartyIX:feature/2024-01-10-PointerOver-preference-over-focus

Conversation

@MartyIX
Copy link
Copy Markdown
Contributor

@MartyIX MartyIX commented Jan 10, 2024

Description of Change

This is just an idea how to fix #19752. I'm very much unsure whether:

I figured that creating a PR is the easiest way to demonstrate what I mean.

  • main behavior:
    Animation
  • PR's behavior:
    Animation

btw: #11840 was merged and it changed VisualElement file like this: https://github.com/dotnet/maui/pull/11840/files#diff-2863605ee57ca6009796676e9d6d910295c5e1866866797d219268c93c79491b. Maybe @Redth can chime in with some feedback.

Issues Fixed

Fixes #19752

@MartyIX MartyIX requested a review from a team as a code owner January 10, 2024 21:08
@ghost ghost added the community ✨ Community Contribution label Jan 10, 2024
@ghost
Copy link
Copy Markdown

ghost commented Jan 10, 2024

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

@MartyIX MartyIX force-pushed the feature/2024-01-10-PointerOver-preference-over-focus branch from ebc8714 to 149cf08 Compare January 10, 2024 21:13
@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 11, 2024

@PureWeen Any feedback please?

@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 14, 2024

@Redth Any feedback please?

@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 21, 2024

@mattleibow Any feedback please?

@MartyIX MartyIX force-pushed the feature/2024-01-10-PointerOver-preference-over-focus branch from 149cf08 to 008627e Compare January 24, 2024 18:02
@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 28, 2024

@rmarinho Any feedback please?

@PureWeen PureWeen added the area-controls-general General issues that span multiple controls, or common base classes such as View or Element label May 31, 2024
Foda
Foda previously approved these changes Jun 6, 2024
Copy link
Copy Markdown
Contributor

@Foda Foda left a comment

Choose a reason for hiding this comment

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

LGTM -- please revert the main page changes before merging.

@MartyIX MartyIX force-pushed the feature/2024-01-10-PointerOver-preference-over-focus branch from 008627e to 326319c Compare June 6, 2024 20:58
@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jun 6, 2024

Rebased and added a revert commit (so it stays in the GitHub history)

Foda
Foda previously approved these changes Jun 6, 2024
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Needs UI tests. The sandbox sample you had was good.

@MartyIX MartyIX force-pushed the feature/2024-01-10-PointerOver-preference-over-focus branch from 326319c to 70c2dee Compare January 28, 2025 21:01
@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 28, 2025

Needs UI tests. The sandbox sample you had was good.

I think that @PureWeen was against the approach of this PR.

I did try to add a UI test but I'm unable to finish it because I'm not sure how to make the first button to be focused on Windows. @jsuarezruiz Would you know please?

@PureWeen
Copy link
Copy Markdown
Member

Needs UI tests. The sandbox sample you had was good.

I think that @PureWeen was against the approach of this PR.

I did try to add a UI test but I'm unable to finish it because I'm not sure how to make the first button to be focused on Windows. @jsuarezruiz Would you know please?

@mattleibow usually with windows don't they add new states that are suffixed with PointerOver?

Are we worried about this being a breaking change or unexpected?

If I remember correctly, I don't think WinUI, for example, ever uses Focus for a VSM

@mattleibow
Copy link
Copy Markdown
Member

i got some changes coming. I was playing with things and will update with more info once I confirm things.

@mattleibow
Copy link
Copy Markdown
Member

I think this PR and description actually points out the issue here: #27477 but the TL;DR is that the focus states are supposed to be in a separate group so that a button can both be focused AND be pointer over.

Thougts?

@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Jan 30, 2025

I think this PR and description actually points out the issue here: #27477 but the TL;DR is that the focus states are supposed to be in a separate group so that a button can both be focused AND be pointer over.

I just wonder what the precedence rules are for these two style groups. I mean I want "pointer-over" state to have higher precedence than "focused" state. Does it depend on the order here https://github.com/dotnet/maui/pull/27477/files#diff-f9f36395cbe8fbe5db0fb42d9eeda70e070ed5ced099553747d1236d4f05117fR16-R54 ?

@mattleibow
Copy link
Copy Markdown
Member

I just copied the WinUI code, but that does not mean that it is the only way.

Since the code I have just typed now is totally different to anything we have, let's move the discussion to #27477

@MartyIX
Copy link
Copy Markdown
Contributor Author

MartyIX commented Mar 6, 2025

Replaced by #27477

@MartyIX MartyIX closed this Mar 6, 2025
@MartyIX MartyIX deleted the feature/2024-01-10-PointerOver-preference-over-focus branch March 6, 2025 14:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-general General issues that span multiple controls, or common base classes such as View or Element community ✨ Community Contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button does not behave properly when pointer hovers over the button because it's in focused state

5 participants