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 686461 - Use separate views for collections and documents in the overview
Use separate views for collections and documents in the overview
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.9.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
: 735881 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-19 12:50 UTC by Daniel Davies
Modified: 2015-02-19 19:28 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
mainToolbar: Remove useless signal connections (1.98 KB, patch)
2014-03-17 12:57 UTC, Debarshi Ray
committed Details | Review
mainToolbar: Do not change the title to reflect the search parameters (2.72 KB, patch)
2014-03-17 12:58 UTC, Debarshi Ray
committed Details | Review
documents: Do the Signals.addSignalMethods dance (596 bytes, patch)
2014-09-25 13:04 UTC, Debarshi Ray
rejected Details | Review
Don't clear DocumentManager on every TrackerController refresh (3.21 KB, patch)
2014-09-25 13:12 UTC, Debarshi Ray
none Details | Review
Merge CollectionManager into DocumentManager (16.05 KB, patch)
2014-09-25 13:17 UTC, Debarshi Ray
none Details | Review
windowMode: Add goBack (3.57 KB, patch)
2014-09-25 16:36 UTC, Debarshi Ray
needs-work Details | Review
windowMode: Add goBack (3.41 KB, patch)
2014-10-15 13:36 UTC, Debarshi Ray
none Details | Review
windowMode: Mark two methods as private (2.07 KB, patch)
2014-10-15 13:37 UTC, Debarshi Ray
none Details | Review
windowMode: Clean up the fullscreen code (3.19 KB, patch)
2014-10-15 13:37 UTC, Debarshi Ray
none Details | Review
search: Split OffsetController so that each view can have its own (2.97 KB, patch)
2014-10-17 16:02 UTC, Debarshi Ray
none Details | Review
trackerController: Split it so that each view can have its own (7.77 KB, patch)
2014-10-17 16:02 UTC, Debarshi Ray
none Details | Review
search: Add a helper to get all document SearchTypes (1.04 KB, patch)
2014-10-17 16:03 UTC, Debarshi Ray
none Details | Review
mainToolbar: Create the selection menu only once during construction (2.68 KB, patch)
2014-10-17 16:04 UTC, Debarshi Ray
none Details | Review
mainToolbar: Add a stack switcher for switching between the views (2.25 KB, patch)
2014-10-17 16:04 UTC, Debarshi Ray
none Details | Review
embed, view: Move the no-results page into the ViewContainer (13.47 KB, patch)
2014-10-17 16:06 UTC, Debarshi Ray
none Details | Review
Don't clear DocumentManager on every TrackerController refresh (3.21 KB, patch)
2015-02-19 09:01 UTC, Debarshi Ray
committed Details | Review
Merge CollectionManager into DocumentManager (16.05 KB, patch)
2015-02-19 09:02 UTC, Debarshi Ray
committed Details | Review
windowMode: Add goBack (5.14 KB, patch)
2015-02-19 09:27 UTC, Debarshi Ray
committed Details | Review
windowMode: Mark _setCanFullscreen as private (1.44 KB, patch)
2015-02-19 09:48 UTC, Debarshi Ray
committed Details | Review
windowMode: Clean up the fullscreen code (2.82 KB, patch)
2015-02-19 09:49 UTC, Debarshi Ray
committed Details | Review
windowMode: Support going back multiple steps (1.66 KB, patch)
2015-02-19 13:33 UTC, Debarshi Ray
committed Details | Review
mainWindow: Use a switch statement for consistency with similar code (1.63 KB, patch)
2015-02-19 13:35 UTC, Debarshi Ray
none Details | Review
search: Split OffsetController so that each view can have its own (2.97 KB, patch)
2015-02-19 13:49 UTC, Debarshi Ray
committed Details | Review
trackerController: Split it so that each view can have its own (7.78 KB, patch)
2015-02-19 13:51 UTC, Debarshi Ray
committed Details | Review
mainWindow: Use a switch statement for consistency with similar code (1.63 KB, patch)
2015-02-19 19:20 UTC, Debarshi Ray
committed Details | Review
search: Add a helper to get all document SearchTypes (1.04 KB, patch)
2015-02-19 19:21 UTC, Debarshi Ray
committed Details | Review
mainToolbar: Create the selection menu only once during construction (2.68 KB, patch)
2015-02-19 19:21 UTC, Debarshi Ray
committed Details | Review
mainToolbar: Add a stack switcher for switching between the views (2.29 KB, patch)
2015-02-19 19:22 UTC, Debarshi Ray
committed Details | Review
embed, view: Move the no-results page into the ViewContainer (14.23 KB, patch)
2015-02-19 19:23 UTC, Debarshi Ray
committed Details | Review
embed, view: Move the error page into the ViewContainer (8.29 KB, patch)
2015-02-19 19:23 UTC, Debarshi Ray
committed Details | Review
application: Let some actions be enabled across multiple window modes (1.69 KB, patch)
2015-02-19 19:24 UTC, Debarshi Ray
committed Details | Review
Rework the application accommodate multiple views (44.64 KB, patch)
2015-02-19 19:24 UTC, Debarshi Ray
committed Details | Review
application: Clean up OffsetController signals (959 bytes, patch)
2015-02-19 19:25 UTC, Debarshi Ray
committed Details | Review

Description Daniel Davies 2012-10-19 12:50:18 UTC
If you create a folder in Google Drive/Docs eg "MyFolder" and then create a document "MyDoc" inside the folder gnome-documents will show the document twice. 

The the folder and document appear in the main gnome-documents window. If you then click on the folder the document appears inside the folder.

This is misleading for users as the location of the document in Google Drive/docs is /MyFolder/MyDoc

But Gnome-Documents is presenting the following:

/MyDocs
/MyFolder/MyDocs
Comment 1 Debarshi Ray 2013-11-23 00:22:30 UTC
This is not specific to Google.

GNOME Documents shows both collections (Google folders are treated as collections) and a list of all documents in the main view. So, if you only had local content and created some collections, you would see both the collections and the documents inside them in the main view.

I have seen some discussion on changing this so that things are not mixed up like this.
Comment 2 Debarshi Ray 2013-11-23 00:24:06 UTC
Changing the summary to reflect this.
Comment 3 Allan Day 2013-12-03 16:11:30 UTC
I like this idea. As the reporter explains, it will make the relationship between collections and "Recent" much clearer.

The latest mockups have separate views for Recent, Collections, Shared and Starred:

https://raw.github.com/gnome-design-team/gnome-mockups/master/documents/documents-collections.png
Comment 4 Debarshi Ray 2014-03-17 12:41:17 UTC
Lets implement this for GNOME 3.14.

I am going to attach a series of patches based on my understanding of how things need to change after implementing this for gnome-photos this cycle. Then we can iterate further.
Comment 5 Debarshi Ray 2014-03-17 12:51:00 UTC
This represents how search should behave in the current split view designs:
https://raw.github.com/gnome-design-team/gnome-mockups/master/music/wire-search.png
Comment 6 Debarshi Ray 2014-03-17 12:57:27 UTC
Created attachment 272146 [details] [review]
mainToolbar: Remove useless signal connections
Comment 7 Debarshi Ray 2014-03-17 12:58:04 UTC
Created attachment 272148 [details] [review]
mainToolbar: Do not change the title to reflect the search parameters
Comment 8 Cosimo Cecchi 2014-03-20 21:36:05 UTC
Review of attachment 272146 [details] [review]:

Looks good
Comment 9 Cosimo Cecchi 2014-03-20 21:37:34 UTC
Review of attachment 272148 [details] [review]:

OK to commit after branching
Comment 10 Debarshi Ray 2014-03-28 13:35:54 UTC
Removing ui-review because we have a design in place now, which we have started to implement.
Comment 11 Joseph Livecchi 2014-08-14 18:21:42 UTC
I was just using Documents to add noticed this.I think it would make documents much easier to use. 

+1 for this.

Thanks of all the hard work
Comment 12 Debarshi Ray 2014-09-08 12:34:20 UTC
*** Bug 735881 has been marked as a duplicate of this bug. ***
Comment 13 Debarshi Ray 2014-09-25 13:04:49 UTC
Created attachment 287071 [details] [review]
documents: Do the Signals.addSignalMethods dance

Not sure how things were working without this because DocumentManager is a pure JS type.
Comment 14 Debarshi Ray 2014-09-25 13:12:53 UTC
Created attachment 287076 [details] [review]
Don't clear DocumentManager on every TrackerController refresh

This is similar to this gnome-photos commit:
https://git.gnome.org/browse/gnome-photos/commit/?id=56f106413d38e66ffd8a542abb4741fa0b68caff

The difference is that the change in gnome-photos was done after we had already implemented split-views, while this is the other way round. I think that gnome-photos' evolution into its current form is very similar to what we are trying to do with gnome-documents, so there is value in not reinventing the wheel and having some synergy.
Comment 15 Debarshi Ray 2014-09-25 13:17:06 UTC
Created attachment 287078 [details] [review]
Merge CollectionManager into DocumentManager

This is similar to this:
https://git.gnome.org/browse/gnome-photos/commit/?id=34edc98b448c122d07ead5f7d2af098b59fc0890

You can read the rationale in bug 737071
Comment 16 Debarshi Ray 2014-09-25 16:36:38 UTC
Created attachment 287097 [details] [review]
windowMode: Add goBack
Comment 17 Cosimo Cecchi 2014-10-14 17:50:39 UTC
Review of attachment 287071 [details] [review]:

::: src/documents.js
@@ +1318,3 @@
     }
 });
+Signals.addSignalMethods(DocumentManager.prototype);

Are you sure this is needed at all? DocumentManager inherits from BaseManager which already does the signals dance.
Comment 18 Cosimo Cecchi 2014-10-14 17:59:42 UTC
Review of attachment 287097 [details] [review]:

::: src/edit.js
@@ +86,3 @@
         this._viewAction.connect('activate', Lang.bind(this,
             function() {
+                Application.modeController.goBack();

I am not really sure using goBack() here is correct; conceptually, the action is "show document preview", not "go back to the previous mode".

On the other hand, I would have expected to see the new function used for the back button.

::: src/windowMode.js
@@ +44,3 @@
+    },
+
+    _canFullscreenPolicy: function(mode) {

Could you rename this to simply _canFullscreen()?

@@ +47,3 @@
+        let retval = false;
+
+        if (mode == WindowMode.PREVIEW

Please merge these on a single line

@@ +60,3 @@
+
+        let oldMode = this._history.pop();
+        }

You could merge this and the previous check with

if (!oldMode || oldMode == WindowMode.NONE)
Comment 19 Debarshi Ray 2014-10-15 12:03:18 UTC
(In reply to comment #17)
> Review of attachment 287071 [details] [review]:
> 
> ::: src/documents.js
> @@ +1318,3 @@
>      }
>  });
> +Signals.addSignalMethods(DocumentManager.prototype);
> 
> Are you sure this is needed at all? DocumentManager inherits from BaseManager
> which already does the signals dance.

Well, it has been working without it till now. All I know is that pure JS classes need to do that, and even though it inherits from BaseManager, it has a few signals of its own too which are not there in the parent. So, the answer is that I don't know. :)
Comment 20 Debarshi Ray 2014-10-15 13:29:53 UTC
(In reply to comment #18)
> Review of attachment 287097 [details] [review]:
> 
> ::: src/edit.js
> @@ +86,3 @@
>          this._viewAction.connect('activate', Lang.bind(this,
>              function() {
> +                Application.modeController.goBack();
> 
> I am not really sure using goBack() here is correct; conceptually, the action
> is "show document preview", not "go back to the previous mode".

True, but we can't just do another setWindowMode because that will add another entry in the stack, and then when you do goBack from the preview you will end up in EDIT instead of OVERVIEW. I went with goBack because it matched my mental model of going from OVERVIEW -> PREVIEW -> EDIT and then coming back. I am open to ideas, though.

Anyway, I think we should atleast enforce the relation between PREVIEW and EDIT (and possibly other modes) in our state tracking.

The thing is that we don't really need a stack to track the modes unless we have the multiple views. So, I could revert this one line and wait till we have some more code.

> On the other hand, I would have expected to see the new function used for the
> back button.

I did not use it for the back button to avoid having code like this in the rest of the application:
    Application.documentManager.setActiveItem(null);
    Application.modeController.goBack();

Ideally the app should have one knob to turn and the state machine should take care of the details. This makes me wonder whether we should merge ModeController and DocumentManager.
 
> ::: src/windowMode.js
> @@ +44,3 @@
> +    },
> +
> +    _canFullscreenPolicy: function(mode) {
> 
> Could you rename this to simply _canFullscreen()?

Problem is that there is already a variable called this._canFullscreen. I have a couple of patches to rearrange the fullscreen code to get rid of this variable and simplify things. I'll attach them separately, and if you want we can shuffle the patches around.

> @@ +47,3 @@
> +        let retval = false;
> +
> +        if (mode == WindowMode.PREVIEW
> 
> Please merge these on a single line

Fixed.

> @@ +60,3 @@
> +
> +        let oldMode = this._history.pop();
> +        }
> 
> You could merge this and the previous check with
> 
> if (!oldMode || oldMode == WindowMode.NONE)

Fixed.
Comment 21 Debarshi Ray 2014-10-15 13:36:15 UTC
Created attachment 288581 [details] [review]
windowMode: Add goBack
Comment 22 Debarshi Ray 2014-10-15 13:37:09 UTC
Created attachment 288582 [details] [review]
windowMode: Mark two methods as private
Comment 23 Debarshi Ray 2014-10-15 13:37:54 UTC
Created attachment 288583 [details] [review]
windowMode: Clean up the fullscreen code
Comment 24 Debarshi Ray 2014-10-17 16:02:22 UTC
Created attachment 288760 [details] [review]
search: Split OffsetController so that each view can have its own
Comment 25 Debarshi Ray 2014-10-17 16:02:49 UTC
Created attachment 288761 [details] [review]
trackerController: Split it so that each view can have its own
Comment 26 Debarshi Ray 2014-10-17 16:03:27 UTC
Created attachment 288762 [details] [review]
search: Add a helper to get all document SearchTypes
Comment 27 Debarshi Ray 2014-10-17 16:04:10 UTC
Created attachment 288763 [details] [review]
mainToolbar: Create the selection menu only once during construction
Comment 28 Debarshi Ray 2014-10-17 16:04:50 UTC
Created attachment 288764 [details] [review]
mainToolbar: Add a stack switcher for switching between the views
Comment 29 Debarshi Ray 2014-10-17 16:06:03 UTC
Created attachment 288767 [details] [review]
embed, view: Move the no-results page into the ViewContainer
Comment 30 Allan Day 2014-11-18 11:49:50 UTC
Adding as a 3.16 target.
Comment 31 Debarshi Ray 2015-02-19 09:01:00 UTC
Since Allan and the release team wants some movement regarding this, I will merge a few things from the branch wip/rishi/split-view that I consider 'safe'. Even then, it will be useful if people test and review them.
Comment 32 Debarshi Ray 2015-02-19 09:01:44 UTC
Created attachment 297247 [details] [review]
Don't clear DocumentManager on every TrackerController refresh
Comment 33 Debarshi Ray 2015-02-19 09:02:18 UTC
Created attachment 297248 [details] [review]
Merge CollectionManager into DocumentManager
Comment 34 Debarshi Ray 2015-02-19 09:27:50 UTC
Created attachment 297249 [details] [review]
windowMode: Add goBack
Comment 35 Debarshi Ray 2015-02-19 09:48:12 UTC
Created attachment 297251 [details] [review]
windowMode: Mark _setCanFullscreen as private
Comment 36 Debarshi Ray 2015-02-19 09:49:16 UTC
Created attachment 297252 [details] [review]
windowMode: Clean up the fullscreen code
Comment 37 Debarshi Ray 2015-02-19 13:33:49 UTC
Created attachment 297267 [details] [review]
windowMode: Support going back multiple steps
Comment 38 Debarshi Ray 2015-02-19 13:35:23 UTC
Created attachment 297268 [details] [review]
mainWindow: Use a switch statement for consistency with similar code
Comment 39 Debarshi Ray 2015-02-19 13:49:55 UTC
Created attachment 297269 [details] [review]
search: Split OffsetController so that each view can have its own
Comment 40 Debarshi Ray 2015-02-19 13:51:35 UTC
Created attachment 297270 [details] [review]
trackerController: Split it so that each view can have its own
Comment 41 Debarshi Ray 2015-02-19 19:18:55 UTC
Review of attachment 287071 [details] [review]:

I don't see a use for this.
Comment 42 Debarshi Ray 2015-02-19 19:20:43 UTC
Created attachment 297296 [details] [review]
mainWindow: Use a switch statement for consistency with similar code
Comment 43 Debarshi Ray 2015-02-19 19:21:25 UTC
Created attachment 297297 [details] [review]
search: Add a helper to get all document SearchTypes
Comment 44 Debarshi Ray 2015-02-19 19:21:56 UTC
Created attachment 297298 [details] [review]
mainToolbar: Create the selection menu only once during construction
Comment 45 Debarshi Ray 2015-02-19 19:22:30 UTC
Created attachment 297303 [details] [review]
mainToolbar: Add a stack switcher for switching between the views
Comment 46 Debarshi Ray 2015-02-19 19:23:06 UTC
Created attachment 297307 [details] [review]
embed, view: Move the no-results page into the ViewContainer
Comment 47 Debarshi Ray 2015-02-19 19:23:36 UTC
Created attachment 297308 [details] [review]
embed, view: Move the error page into the ViewContainer
Comment 48 Debarshi Ray 2015-02-19 19:24:17 UTC
Created attachment 297309 [details] [review]
application: Let some actions be enabled across multiple window modes
Comment 49 Debarshi Ray 2015-02-19 19:24:40 UTC
Created attachment 297310 [details] [review]
Rework the application accommodate multiple views
Comment 50 Debarshi Ray 2015-02-19 19:25:04 UTC
Created attachment 297311 [details] [review]
application: Clean up OffsetController signals
Comment 51 Debarshi Ray 2015-02-19 19:28:31 UTC
Thanks for being patient and sorry for the delay.