quasar icon indicating copy to clipboard operation
quasar copied to clipboard

feat(QScrollArea): add scroll viewport to create overscrolling effect

Open thexeos opened this issue 1 year ago • 0 comments

When designing pages (lists, galleries, horizontal scrollers) that have overlays (headers, footers, navigation panels on the sides) using QScrollArea results in either the scroll bar overlapping the content of the overlays (Figure 1) or scroll thumb/bar being hidden (and made inaccessible) by the overlays (Figure 2). In both cases, it leads to confusing experience for users.

If we add offsets to bottom/top of each (vertical and horizontal) scroll tracks, then it will effectively create a scrollable viewport within the container. The scroll behavior remains consistent and predictable to users, while developers get the freedom of creating overlays and adding acrylic/glass effects to their lists. See Figures 3-4.

What kind of change does this PR introduce?

  • [X] Feature

Does this PR introduce a breaking change?

  • [X] No

The PR fulfills these requirements:

  • [X] It's submitted to the dev branch (or v[X] branch)
  • [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • [ ] It's been tested on a Cordova (iOS, Android) app
  • [ ] It's been tested on an Electron app
  • [ ] Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • [X] A convincing reason for adding this feature.

Figure 1. chrome_NS7urur5no

Figure 2. chrome_TSSRZD0sYO

Figure 3. chrome_aysY4ILKJK

Figure 4. chrome_lFTDUCw31L

Other information:

Note 1: there is no documentation in PR yet, until the feature is approved and parameter names are "locked in".

Note 2: this includes code from #17041 and #17207 - once those are merged I will rebased this against the (updated) dev branch.

thexeos avatar May 18 '24 01:05 thexeos