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

fix: Prevent horizontal shifting in properties grid #1475

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

sfoslund
Copy link
Member

@sfoslund sfoslund commented Nov 9, 2022

Details

By default when a ScrollViewer is wrapping a Grid, WPF scrolls to focus on the element being selected in the grid. This is the behavior we want for vertical scrolling, but this causes some jumpy behavior in the horizontal scrollbar, as described in #1150. The horizonal jumps would make more sense if the user were navigating between cells horizontally, but since we treat the properties grid as a list and only allow navigation between rows (as opposed to between cells), the default behavior just looks odd. As a result, this PR overrides WPF default behavior by keeping vertical navigation the same but removing the horizontal component.

Motivation

Addresses issue #1150

Context

Behavior after this change:
[Description: Gif of AIWin in live inspect mode. User navigates arounds property grid with keyboard. Navigation is the same as before but horizontal jumps have been removed.]

Accessibility Insights for Windows - Inspect - Live 2022-11-09 09-33-19

Pull request checklist

@sfoslund sfoslund requested a review from a team as a code owner November 9, 2022 22:02
Copy link
Contributor

@DaveTryon DaveTryon left a comment

Choose a reason for hiding this comment

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

Looks great! I'd tried to fix this one before but hadn't found the right mix of changes

@sfoslund sfoslund merged commit 5d1b659 into microsoft:main Nov 9, 2022
@sfoslund sfoslund deleted the ScrollingBug branch November 9, 2022 22:26
sfoslund added a commit that referenced this pull request Nov 10, 2022
#### Details

Fix bug in
#1475 in
which search bar height was not taken into account in vertical scrolling
logic.

Behavior after this PR:
[Description: Gif of AIWin in live inspect mode. User navigates arounds
property grid, which has the search bar visible at the top. Navigation
is the same as before but horizontal jumps have been removed.]
![Accessibility Insights for Windows - Inspect - Live 2022-11-10
14-14-34](https://user-images.githubusercontent.com/16010855/201217821-805ee741-7c9a-495c-99dc-9cbebdbc79af.gif)

##### Motivation

Fix bug

#### Pull request checklist

- [ ] Run through of all [test
scenarios](https://github.com/Microsoft/accessibility-insights-windows/blob/main/docs/Scenarios.md)
completed?
- [ ] Does this address an existing issue? If yes, Issue# - 
- [x] Includes UI changes?
- [ ] Run the production version of Accessibility Insights for Windows
against a version with changes.
  - [x] Attach any screenshots / GIF's that are applicable.
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.

None yet

2 participants