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 642712 - improve the file chooser design
improve the file chooser design
Status: RESOLVED DUPLICATE of bug 722211
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.0.x
Other All
: Normal enhancement
: 3.4
Assigned To: Federico Mena Quintero
Federico Mena Quintero
touch
Depends on:
Blocks: document-centric filechooser-nautilus
 
 
Reported: 2011-02-18 20:32 UTC by William Jon McCann
Modified: 2014-01-14 23:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set initial pane position (876 bytes, patch)
2011-02-18 20:34 UTC, William Jon McCann
committed Details | Review
Use some spacing between buttons in the pathbar (853 bytes, patch)
2011-02-18 20:34 UTC, William Jon McCann
rejected Details | Review
Add a class to the chooser sidebar so we can style it (1.37 KB, patch)
2011-02-18 20:34 UTC, William Jon McCann
committed Details | Review
Streamline the layout of the file chooser (75.76 KB, patch)
2011-02-18 20:34 UTC, William Jon McCann
needs-work Details | Review
Remove add/remove bookmark toolbar (9.33 KB, patch)
2011-02-18 20:34 UTC, William Jon McCann
needs-work Details | Review
Move filter box to top location bar (1.76 KB, patch)
2011-02-18 20:35 UTC, William Jon McCann
needs-work Details | Review
Make pathbar and location entry mutually exclusive (3.66 KB, patch)
2011-02-18 20:35 UTC, William Jon McCann
needs-work Details | Review
Remove unused variable (892 bytes, patch)
2011-03-20 21:45 UTC, Thomas Andersen
rejected Details | Review
mockup (folder selection) (95.65 KB, image/png)
2013-01-21 02:09 UTC, William Jon McCann
  Details

Description William Jon McCann 2011-02-18 20:32:56 UTC
I think it makes sense to use some of the good ideas that are part of the Nautilus 3.0 design to improve the file chooser.  It also makes a lot of sense to me to have consistency between them.

I'll attach an experimental (but mostly working) prototype of this.
Comment 1 William Jon McCann 2011-02-18 20:34:46 UTC
Created attachment 181269 [details] [review]
set initial pane position
Comment 2 William Jon McCann 2011-02-18 20:34:49 UTC
Created attachment 181270 [details] [review]
Use some spacing between buttons in the pathbar
Comment 3 William Jon McCann 2011-02-18 20:34:52 UTC
Created attachment 181271 [details] [review]
Add a class to the chooser sidebar so we can style it
Comment 4 William Jon McCann 2011-02-18 20:34:55 UTC
Created attachment 181272 [details] [review]
Streamline the layout of the file chooser

To make it a bit more orderly and more like Nautilus
Comment 5 William Jon McCann 2011-02-18 20:34:58 UTC
Created attachment 181273 [details] [review]
Remove add/remove bookmark toolbar
Comment 6 William Jon McCann 2011-02-18 20:35:01 UTC
Created attachment 181274 [details] [review]
Move filter box to top location bar
Comment 7 William Jon McCann 2011-02-18 20:35:05 UTC
Created attachment 181275 [details] [review]
Make pathbar and location entry mutually exclusive
Comment 8 Federico Mena Quintero 2011-02-22 00:00:50 UTC
Review of attachment 181269 [details] [review]:

Commit this if you want.  I'd prefer it if bug #524295 were fixed instead - it's about saving the position of the sidebar pane, along with the rest of the file chooser's state.

(Complaints about the default size of the file chooser basically vanished when the chooser started saving its window size - you resize it once and be happy thereafter.)
Comment 9 Federico Mena Quintero 2011-02-22 00:05:54 UTC
Review of attachment 181270 [details] [review]:

Heh, I changed it from 3 to 0 back in commit d955928bd :)  I'd actually prefer it if the buttons were really zero pixels apart, rather than having whatever minimal spacing they have right now (due to the spacing for the default widget?  no idea.).

Of course one day the elves will write us a really pretty pathbar widget, etc. etc. etc.
Comment 10 Federico Mena Quintero 2011-02-22 00:07:37 UTC
Review of attachment 181271 [details] [review]:

Go for it!
Comment 11 William Jon McCann 2011-02-22 00:16:00 UTC
(In reply to comment #9)
> Review of attachment 181270 [details] [review]:
> 
> Heh, I changed it from 3 to 0 back in commit d955928bd :)  I'd actually prefer
> it if the buttons were really zero pixels apart, rather than having whatever
> minimal spacing they have right now (due to the spacing for the default widget?
>  no idea.).
> 
> Of course one day the elves will write us a really pretty pathbar widget, etc.
> etc. etc.

Zero doesn't really work as it is.  If you want that at minimum you need to set up junction sides.
Comment 12 Federico Mena Quintero 2011-02-24 02:29:02 UTC
Review of attachment 181272 [details] [review]:

The new shortcuts bar looks great!

I'd like this commit split in at least two pieces, one to revamp the look of the shortcuts bar, and another to move the widgets around (but see below).

I don't like it that the shortcuts bar is no longer aligned with the file list.  We went through rather big pains to make them line up and to have the location entry / pathbar / stuff in the top row always stay the same height.  So, while the shortcuts bar with headings looks great, I'd rather leave it aligned.

A few problems I caught with some quick testing:

- When you click on a bookmark, it disappears from the shortcuts, and reappears when you go to some other folder.  This makes the other bookmarks jump up and down.  The bookmark row should stay put.

- As a result of that, the right-click menu on bookmarks no longer works.

- If you click on something under the Computer heading (say, your own Home) and then go to another folder, the shortcut you clicked on remains highlighted.  The idea is that something in the shortcuts bar is highlighted iff you are in that folder.

- If you drag a folder from the file list into the shortcuts bar, and hover on the items in the Computer section, they highlight as if you were able to drop on those rows.  But when you drop, the item gets added on the Bookmarks.  You need to update the fancy code that detects the tentative drop positions, so that the line that indicates "your drop will happen here" will appear in the right place - and so that the Computer's subitems won't highlight at all.
Comment 13 Federico Mena Quintero 2011-02-24 18:59:45 UTC
Review of attachment 181273 [details] [review]:

Thanks; I've wanted to remove the add/remove buttons for a long time.

For this to be really effective, we need a more obvious way of bookmarking things and removing bookmarks.

Removing is simple enough; see my comments above about not removing the current folder from the bookmarks list - that should make the right-click menu work.  For bonus points, you could add an on-hover trashcan icon that when clicked, removes the bookmark.

For bookmarking folders, there are several options:

- Show an on-hover "+" sign on folders in the file list, with a "bookmark this folder" tooltip or something - like what Youtube has for adding videos to your queue.

- Show a "Drag a folder here to bookmark it" text in the shortcuts bar at some point.  Maybe if the list is empty?  Maybe if you hover the list for some time?

So, please push this commit, but take the above into account.
Comment 14 Federico Mena Quintero 2011-02-24 19:02:33 UTC
Review of attachment 181274 [details] [review]:

If we keep the "Edit" button on the left of the patbar, then sure, we can move the filter combo to the top right.  Otherwise it looks cluttered.
Comment 15 Federico Mena Quintero 2011-02-24 19:08:31 UTC
Review of attachment 181275 [details] [review]:

I like the idea.  However, with this patch as-is it means that if you have the location entry turned on, then you cannot know which folder you are in.  Try browsing in that mode for a little; you get lost pretty fast.

I'm open to suggetions about how to deal with that.  I think the file chooser would look pretty acceptable as it is, with your changes to the shortcuts bar, to move the filter combo to the top right, and to remove the add/remove buttons.  The location entry is hidden by default, and it's pretty clear that when you turn it on, it just adds a row between the pathbar and the treeviews.
Comment 16 Federico Mena Quintero 2011-03-14 17:36:35 UTC
(In reply to comment #3)
> Created an attachment (id=181271) [details] [review]
> Add a class to the chooser sidebar so we can style it

We talked about using "GtkPlacesView" as a name, for when that widget gets pulled out as a public widget.
Comment 17 Federico Mena Quintero 2011-03-17 20:19:02 UTC
Cosimo suggests adding a GTK_STYLE_CLASS_SIDEBAR to gtkstylecontext.h and using that.  That should be useful for the file chooser's sidebar as well as others.
Comment 18 Cosimo Cecchi 2011-03-17 21:12:03 UTC
Comment on attachment 181269 [details] [review]
set initial pane position

Attachment 181269 [details] pushed as 882cdf3 - set initial pane position
Comment 19 Cosimo Cecchi 2011-03-17 21:14:02 UTC
Comment on attachment 181271 [details] [review]
Add a class to the chooser sidebar so we can style it

I committed a very similar patch which uses a sidebar style class.
Comment 20 Cosimo Cecchi 2011-03-17 21:15:23 UTC
Comment on attachment 181273 [details] [review]
Remove add/remove bookmark toolbar

This actually needs more work, as the sidebar and the main view end up being misaligned at the bottom, which is unpleasant.
I discussed with Jon and we decided to punt this to 3.2.
Comment 21 Thomas Andersen 2011-03-20 21:45:02 UTC
Created attachment 183869 [details] [review]
Remove unused variable

Commit from comment #19 added an unused variable. Trivial patch to remove it.
Comment 22 Federico Mena Quintero 2011-09-06 17:09:57 UTC
Some updates:

We now have GTK_STYLE_CLASS_SIDEBAR, and that is used for the shortcuts pane instead of an ad-hoc style class name.

The pathbar's buttons have zero spacing between them, but now the pathbar is properly jointed as per bug #658077.

I've consolidated a lot of code that deals with the pathbar, location entry, and the various widgets in the top area of the file chooser.  This should make it easier to change that part of the code now.  The people in #gnome-design are talking about how to make this topmost area as similar as possible to Nautilus's.  We need to think about how to fit a switch for list/icon view (see bug #141154 for the icon view patches); whether to move the filters to the top; and how to put Back/Forward buttons there.

I'll revisit your patch to streamline the shortcuts bar; this is the major area of divergence with Nautilus, and the current shortcuts bar is pretty annoying anyway.
Comment 23 Thomas Andersen 2011-12-25 01:11:46 UTC
Comment on attachment 183869 [details] [review]
Remove unused variable

rejecting my old patch as that small side-issue has been resolved since
Comment 24 William Jon McCann 2013-01-21 02:09:09 UTC
Created attachment 233977 [details]
mockup (folder selection)
Comment 25 Milan Bouchet-Valat 2013-01-21 08:59:38 UTC
About the mockup: generally I think it's great. Three remarks:
1) The Select button at the top is a good idea to save space, but so far all dialogs have buttons at the bottom. This is really disturbing. Plus, without client-side decorations, you will not be able to draw it at that place at al.
2) Is there a way to close the dialog without selecting anything (Cancel button)?
3) If, as the window title says, the user is requested to choose _one_ folder, then the check boxes should be radio buttons. Else, the user will assume several items can be selected.
Comment 26 Federico Mena Quintero 2013-01-21 17:23:12 UTC
I like the folder selection mockup in comment #24:

* It makes very clear what is going to be selected.

* From an implementation viewpoint, it should be simple to add a checkbox column to the file list (or radio buttons if it's in single-selection mode).

Some corner cases:

1. How would you select $HOME?  Expect the user to navigate up to /home and select your home directory inside there?

2. How would you select /?
Comment 27 William Jon McCann 2014-01-14 23:01:37 UTC

*** This bug has been marked as a duplicate of bug 722211 ***