GNOME Bugzilla – Bug 635034
Should be able to swipe-scroll anywhere on the background
Last modified: 2011-01-24 09:35:25 UTC
With the relayout, when you are on the "Windows" tab, it's completely mysterious and unpredictable what parts of the background you can drag to scroll between workspaces. And very hard to find such a spot when you have a workspace with just one window. It should be possible to grab and drag on basically any part of the background that isn't occupied by something else.
Assuming that the window rubberbanding in http://live.gnome.org/GnomeShell/Design/Whiteboards/OverviewWindowDND is still wanted, swipe-scroll might disappear entirely.
Created attachment 179119 [details] [review] overview: Add a facility for swipe-scrolling The workspaces view allows to drag the active workspace to swipe-scroll to the next or previous workspace. While this behavior can come in handy in general, there are good reasons to move the functionality to the overview: - Finding a spot on a workspace to start a drag can be hard, especially when the workspace contains a single window - With the new layout, workspaces have no visible border, making it hard to predict where a drag can be initiated - The same behavior is equally useful for other elements So add setScrollAdjustment() to the overview, which allows setting an adjustment controlled with swipe-scrolling (either horizontally or vertically); only a single adjustment can be controlled at a time. A swipe-scroll can be initiated on any part of the background that is not occupied by a reactive actor. For cases where further control is needed, 'swipe-scroll-start' and 'swipe-scroll-end' signals are emitted.
Created attachment 179120 [details] [review] workspaces-view: Use overview swipe-scrolling Remove the swipe-scrolling implementation in WorkspacesView and use the new overview facility.
Created attachment 179121 [details] [review] app-display: Enable swipe-scrolling in the app view With general support for swipe-scrolling in the overview, there is no reason to limit the behavior to workspaces. It is equally useful for scrolling through the grid of available applications, so enable swipe-scrolling for the app view.
Created attachment 179122 [details] [review] search-display: Enable swipe scrolling If a search gives many results from various providers, the result area will be scrollable, so enable swipe-scrolling here as well.
Review of attachment 179119 [details] [review]: In testing with swipe scrolling for applications, search, one thing you notice is that you get prelights during swipe scrolling - so might need to block enter/leave events with the event capture (is that possible?). Of course, that could leave a missing prelight on release, but maybe that feels OK. ::: js/ui/overview.js @@ +354,3 @@ + if (stageX == this._dragStartX && + stageY == this._dragStartY) { + // no motion? It's a click! I think there probably needs to be some threshold here; don't know if using the same value as dnd.js makes sense or if that's too far
Review of attachment 179120 [details] [review]: Generally looks good, few things: ::: js/ui/workspacesView.js @@ +635,3 @@ + // Only switch to the workspace when there's no application + // windows open. The problem is that it's too easy to miss + // an app window and get the wrong one focused. I'm not sure we want this - it doesn't feel at all natural (in fact, just a few minutes ago I accidentally clicked on the background on a empty workspace when trying to switch tabs and left the overview and didn't figure out what happened until I saw this in the code) @@ +640,3 @@ + Main.overview.hide(); + } else if (result == Overview.SwipeScrollResult.SWIPE) + this._scrollToActive(false); If this is necessary (I'm not sure why and it seems to apparently work fine without it) it needs commentary about why it is necessary and how it interacts with the generic swipe scrolling tween to the final position. @@ +642,3 @@ + this._scrollToActive(false); + else + this._updateVisibility(); This also needs a comment - not sure what it's about
Review of attachment 179121 [details] [review]: Looks good
Review of attachment 179122 [details] [review]: Looks good
Created attachment 179127 [details] [review] overview: Add a facility for swipe-scrolling (In reply to comment #6) > In testing with swipe scrolling for applications, search, one thing you notice > is that you get prelights during swipe scrolling - so might need to block > enter/leave events with the event capture (is that possible?). Yes, but only until the pointer is released (which is when the capture handler is disconnected). Raising the cover pane while tweening to the final position works fine though. > ::: js/ui/overview.js > @@ +354,3 @@ > + if (stageX == this._dragStartX && > + stageY == this._dragStartY) { > + // no motion? It's a click! > > I think there probably needs to be some threshold here; don't know if using the > same value as dnd.js makes sense or if that's too far Makes sense.
Created attachment 179128 [details] [review] workspaces-view: Use overview swipe-scrolling (In reply to comment #7) > I'm not sure we want this - it doesn't feel at all natural (in fact, just a few > minutes ago I accidentally clicked on the background on a empty workspace when > trying to switch tabs and left the overview and didn't figure out what happened > until I saw this in the code) I wouldn't mind removing it altogether, but that's a change from current behavior. For now I added an additional check whether the click happened on the actual workspace, which matches the current behavior more closely (but has again the problem that it's unclear what exact part triggers the behavior - so removing it probably is better after all) ... > If this is necessary (I'm not sure why and it seems to apparently work fine > without it) it needs commentary about why it is necessary and how it interacts > with the generic swipe scrolling tween to the final position. OK. I updated that part and added comments.
Review of attachment 179127 [details] [review]: Looks good
Review of attachment 179128 [details] [review]: Looks good
Attachment 179121 [details] pushed as e96a90b - app-display: Enable swipe-scrolling in the app view Attachment 179122 [details] pushed as 1b383c7 - search-display: Enable swipe scrolling Attachment 179127 [details] pushed as a6da22f - overview: Add a facility for swipe-scrolling Attachment 179128 [details] pushed as d64d491 - workspaces-view: Use overview swipe-scrolling