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

Support mouse and forward navigation #2164

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Support mouse and forward navigation #2164

merged 1 commit into from
Jan 25, 2024

Conversation

nieubank
Copy link
Contributor

Summary of the pull request

  • Adds the ability to forward navigate between pages
  • Configures pointer navigation support (i.e. mouse forward and back buttons).

References and relevant issues

Addresses #1083, specifically targeting mouse navigation but the fix should apply more broadly to other custom keys.

Similar to #551, this addresses inconsistencies in the invocation of navigation (keyboard accelerator, forward vs. back, mouse, etc.), but does not do anything to address the gap between navigation at the application level (existing navigation service implementation) vs. nested navigation in individual tools, e.g. SetupFlow.

Detailed description of the pull request / Additional comments

Specifically added a keyboard accelerator handler for forward, the existing implementation assumed all accelerator invocations are for back navigation.

PointerPressed is used to identify navigation via XButton1/2 as per https://learn.microsoft.com/en-us/windows/apps/design/basics/navigation-history-and-backwards-navigation#handle-mouse-navigation-buttons, using the page UIElement rather than the defunct CoreWindow in the sample.

Validation steps performed

  • Navigate manually from Dashboard to each top level page, pressing the back and forward buttons periodically to ensure navigation correctly goes back along the navigation stack.
  • Ensure navigation to the Settings page correctly follows navigating to and from sub-pages.
  • Ensure invocations work correctly regardless of pointer positioning, e.g. hovering over the NavigationFrame itself vs. the NavigationViewControl/hamburger menu area.

PR checklist

@krschau krschau added the Needs-Second Pull request that needs another approval label Jan 25, 2024
@AmelBawa-msft AmelBawa-msft merged commit 524850e into microsoft:main Jan 25, 2024
4 checks passed
@krschau krschau removed the Needs-Second Pull request that needs another approval label Jan 25, 2024
@nieubank nieubank deleted the user/nieubank/navigation branch March 8, 2024 21:35
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.

I cannot return to the previous screen using the touch panel shortcuts on my laptop.
3 participants