After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610801 - [Overview] Use one button to toggle between single and grid view
[Overview] Use one button to toggle between single and grid view
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-23 12:00 UTC by drago01
Modified: 2010-03-18 15:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[Overview] Use one button to toggle between single and grid view (3.46 KB, patch)
2010-02-23 12:00 UTC, drago01
none Details | Review
[Overview] Use one button to toggle between single and grid view (4.28 KB, patch)
2010-03-17 15:46 UTC, drago01
reviewed Details | Review
[Overview] Use one button to toggle between single and grid view (3.35 KB, patch)
2010-03-17 17:08 UTC, drago01
none Details | Review
[Overview] Use one button to toggle between single and grid view (4.05 KB, patch)
2010-03-17 17:45 UTC, drago01
none Details | Review
[Overview] Use one button to toggle between single and grid view (4.39 KB, patch)
2010-03-17 17:47 UTC, drago01
reviewed Details | Review
[Overview] Use one button to toggle between single and grid view (4.36 KB, patch)
2010-03-18 14:27 UTC, drago01
committed Details | Review

Description drago01 2010-02-23 12:00:29 UTC
Currently we use two buttons to toggle between the different views,
one of them always being redundant.

Fix that by only use one button that changes it's style depending on
the current view.
Comment 1 drago01 2010-02-23 12:00:50 UTC
Created attachment 154488 [details] [review]
[Overview] Use one button to toggle between single and grid view
Comment 2 Florian Müllner 2010-02-23 16:09:26 UTC
Mmmh, this obviously needs ui review - I don't see that much benefit here, apart from gaining 24px of empty space / scrollbar.

On the other hand, there are some disadvantages IMO:

 - it breaks the symmetry of having two buttons on each side
   (yes, that's somewhat superficial, but it provides some balance
    and is easier on the eye)

 - especially the single-view button is completely cryptic if displayed
   stand-alone (and remember that shell defaults to grid view, so the
   first time the user clicks the (+) button, a little square will appear
   on the bottom left - right now, there's a highlighted little grid icon
   which somehow resembles the layout on screen beside that square, which
   hopefully makes it a lot easier to figure out what those controls do)

 If you try to forget for a moment that there are two toggle buttons in the source code, you may think of it more like a radio button group - the available options are all visible, but only one of them is active at any time. Instead of adding a special widget for customizable radio buttons (which would probably never be used anywhere else), it was implemented much more reasonably as toggle buttons with linked states - it's an implementation detail which should not determine the interface. I'm not saying that the current interface cannot be improved, but this looks like a stop backward to me.

Of course, IANAID (I am not an interface designer) ...
Comment 3 drago01 2010-02-23 16:18:38 UTC
(In reply to comment #2)
> Mmmh, this obviously needs ui review - I don't see that much benefit here,
> apart from gaining 24px of empty space / scrollbar.

Sure that's why I added the ui-review keyword.
Well my idea is that you don't need a button that does nothing other than telling you what mode you are currently using (which is obvious anyway).

> On the other hand, there are some disadvantages IMO:
> 
>  - it breaks the symmetry of having two buttons on each side
>    (yes, that's somewhat superficial, but it provides some balance
>     and is easier on the eye)

Well the buttons on the right need a redesign anyway imho (+ is supposed to be a drop target but is way to small for that).

>  - especially the single-view button is completely cryptic if displayed
>    stand-alone (and remember that shell defaults to grid view, so the
>    first time the user clicks the (+) button, a little square will appear
>    on the bottom left - right now, there's a highlighted little grid icon
>    which somehow resembles the layout on screen beside that square, which
>    hopefully makes it a lot easier to figure out what those controls do)
> 
>  If you try to forget for a moment that there are two toggle buttons in the
> source code, you may think of it more like a radio button group - the available
> options are all visible, but only one of them is active at any time. Instead of
> adding a special widget for customizable radio buttons (which would probably
> never be used anywhere else), it was implemented much more reasonably as toggle
> buttons with linked states - it's an implementation detail which should not
> determine the interface. I'm not saying that the current interface cannot be
> improved, but this looks like a stop backward to me.

Well if we can do the same as we do with the (-) button when there is only workspace it I'd be fine with having two buttons (i.e make the other one insensitive) ... but the redundant one feels odd to me. (well it is a small detail which I can just ignore but ...)

> Of course, IANAID (I am not an interface designer) ...

Neither am I ;)
Comment 4 Dan Winship 2010-02-23 17:02:14 UTC
(In reply to comment #2)
>  - especially the single-view button is completely cryptic if displayed
>    stand-alone

Sure, but it's completely cryptic when displayed next to the grid-view button too :-). Especially since you can't actually tell which one is highlighted and which one isn't. (Notably, the "single" button is a solid color when it's selected, and has a white highlight around it when it's *not* selected, which doesn't make much sense.)

Probably the "single" button should show a little bit of a the workspaces on the left and right sides of the focused workspace, quickly fading to black. That doesn't match how it's actually displayed, but it's more evocative of the single-workspace layout than just showing a single workspace is.
Comment 5 William Jon McCann 2010-03-09 20:44:06 UTC
Some valid points raised.  I agree that our single workspace icon is pretty poor.  So, I'm not sure this makes that mode much less mysterious.  Since we are defaulting to linear/single view I think having a toggle to grid makes sense.  I think we are in a process of de-emphasizing the grid view anyway.  In the longer term, I expect it will remain but perhaps as an expose of workspaces view - an uber-overview.  We'll see.

I am sensitive to the symmetry arguments but don't think we should be overly constrained by them.

That said, this seems like a nice change, in line with where we see this stuff going, and that I'm happy to try.
Comment 6 drago01 2010-03-17 15:46:45 UTC
Created attachment 156371 [details] [review]
[Overview] Use one button to toggle between single and grid view

*) Rebase to master
Comment 7 Florian Müllner 2010-03-17 16:26:52 UTC
Review of attachment 156371 [details] [review]:

Overall looks good - all comments are stylistic.

::: js/ui/workspacesView.js
@@ +1204,3 @@
             this.actor = new St.BoxLayout({ style_class: 'workspaces-bar' });
+        this._toggleViewButton = new St.Button({ style_class: "workspace-controls switch-single" });
+        // View switcher button

Double quotes should be used to mark translatable strings - use single quotes here!
I'd also prefer assigning the correct class from the start and not changing it eventually right after creation - the actor has not been added to a stage yet, so there are no performance implications.

@@ +1217,1 @@
+        this.actor.add(this._toggleViewButton, {'y-fill' : false, 'y-align' : St.Align.START});

I very much prefer y_fill: false (without quotes and underscore, no space before the colon)

@@ +1298,2 @@
         } else {
+            this._toggleViewButton.show();

Our style allows to leave out the braces in cases like this (both if-else parts have just one line).
Comment 8 drago01 2010-03-17 17:08:17 UTC
Created attachment 156381 [details] [review]
[Overview] Use one button to toggle between single and grid view

*) Fixed style issues
Comment 9 drago01 2010-03-17 17:45:40 UTC
Created attachment 156383 [details] [review]
[Overview] Use one button to toggle between single and grid view

Argh ... upload the working version
Comment 10 drago01 2010-03-17 17:47:36 UTC
Created attachment 156385 [details] [review]
[Overview] Use one button to toggle between single and grid view
Comment 11 Florian Müllner 2010-03-18 01:31:55 UTC
Review of attachment 156385 [details] [review]:

Looks good - I have one minor comment left, but feel free to go ahead anyway if you disagree ;)

::: js/ui/workspacesView.js
@@ +1178,3 @@
+            this._toggleViewButton.set_style_class_name('workspace-controls switch-mosaic');
+        if (WorkspacesViewType.SINGLE == view)
+

This code is duplicated below - not a big deal, but if we ever happen to rename the style classes, the change has to be done in two places, so it may be a good idea to move that code to a separate function.

(Also note that instead of using set_style_class_name() you can just assign to the style_class property - of course there's no benefit besides cutting down a little on the line length)
Comment 12 drago01 2010-03-18 14:27:43 UTC
Created attachment 156453 [details] [review]
[Overview] Use one button to toggle between single and grid view

*) Avoid code duplication
Comment 13 Florian Müllner 2010-03-18 15:16:44 UTC
Review of attachment 156453 [details] [review]:

Looks good.