Skip to content

Polish page-switching behavior during DND in the app grid

Jonas Dreßler requested to merge verdre/gnome-shell:icon-grid-dnd-new into main

From the commit message of ae1f0ba1:

With MR !2335 (merged), the page navigation in the app grid was redone and prominent, always visible navigation arrows were added. This larger change in the navigation of the app grid also involved changes to the drag and drop behavior.

Before those changes (in GNOME 42), switching pages during DND in the app grid worked like this: By "bumping" the cursor against the monitor/appGrid edge, an immediate page switch would be triggered. Leaving the cursor in that edge area would then trigger repeated page switches every second. By repeating the "bump" gesture (moving cursor back into the grid, then "bumping" against the edge again), it was possible to switch pages even faster than every second.

When adding the always visible navigation arrows, we briefly tried out a different way of page-switching during DND with commit 09b975fa: The "bump against monitor edge" gesture (or "overshoot" behavior as it's called in the code) was replaced with a hover timeout on the navigation arrows. The idea behind that was to allow hovering the navigation arrow during DND to eventually trigger a page switch, which also makes sense.

The replacement of the "overshoot" behavior made some people unhappy though, so it was decided to bring back the old "overshoot" behavior with commit 4dcae8dd. Due to time pressure before the release that didn't go very well and we ended up with a mixup of both approaches that doesn't feel too polished.

So let's try to fix that by first going back to the working "overshoot" implementation as it was in 42, then slightly refactoring that implementation, to finally incorporate the new "page indicator hover" behavior that !2335 (merged)

Edited by Jonas Dreßler

Merge request reports

Loading