microsoft / WinUI-Gallery

This app demonstrates the controls available in WinUI and the Fluent Design System.
MIT License
2.84k stars 637 forks source link

Disable horizontal scrolling in code examples #704

Open jdoubleu opened 3 years ago

jdoubleu commented 3 years ago

Describe the bug The contents of some code examples expand further than the main content column of the current page. This introduces horizontal scrolling of the code examples through <ContentExample.Xaml> and effectively the surrounding ScrollView. The horizontal scrolling is triggered as soon as the user hovers over the area (i.e. <ContentExample.Xaml>).

This impacts the overall usability, because the scrolling in the page is interrupted as soon as the user hovers to code area.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Go to the ListVIew examples page a. Adjust the XAML Controls Gallery app's width so that the sidebar is just shown.
  2. Place your cursor in the center of the screen, or somewhere else on the page.
  3. Try to scroll down.

Actual behavior You should notice, that as soon as your mouse enters a code example area, the scrolling stops. Instead you are horizontally scrolling in that area.

Expected behavior Page scrolling is not interrupted.

Screenshots

image

Version Info

Additional context

Suggestion: disable horizontal scrolling of the code examples through user input completely. Instead only show the scrollbar so the use can drag it manually.

Windows 10 version:

Device form factor:

Jay-o-Way commented 1 year ago

+1 from me

karkarl commented 10 months ago

The question here is more-so what one would expect when scrolling? With the expander however, the horizontal scrolling annoyance is less of an issue. In the meantime, I will bring this up with the design team.

Jay-o-Way commented 10 months ago

Note that some mice are able to scroll both vertically and horizontally, via the wheel.

Jay-o-Way commented 10 months ago

The question here is more-so what one would expect when scrolling?

Can't speak for everybody, but my answer would be not a horizontal scroll :)

karkarl commented 6 months ago

Commenting here as well for posterity: I'm ok with disabling horizontal scroll, it annoys me quite a lot too :)

Jay-o-Way commented 6 months ago

Commenting here as well for posterity: I'm ok with disabling horizontal scroll, it annoys me quite a lot too :)

To clear up ambiguity: actively disabling HorizontalScroll will make it impossible, so that's a no-go. PR 1540 solves this issue.