Bug 104154 - Add detailed list view to template manager
Summary: Add detailed list view to template manager
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: VertD
URL:
Whiteboard: target:7.2.0
Keywords: difficultyInteresting, easyHack, skillCpp
: 63256 (view as bug list)
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2016-11-25 08:32 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2022-08-08 07:49 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
show problematic appearance (4.41 KB, image/png)
2020-12-13 23:59 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2016-11-25 08:32:29 UTC
Currently the Template Manager only has a thumbnail view.
Users with many templates wish to have a list view because they are used to find a template by its name instead of by its preview (there might be many similiar templates), and because loading the preview can take a considerable time.

So the task is to implement a list view and add a method to switch between List view and Thumbnail view. The selection should be remembered for the next launch of the template manager.

The same functionality can be seen in the remote files dialog (File->Open->Remote file).

Code pointers:
* Template manager code: http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/templatedlg.cxx
* Template manager UI file: http://opengrok.libreoffice.org/xref/core/sfx2/uiconfig/ui/templatedlg.ui
* Path that added icon/list view switching to remote files dialog (for reference): https://cgit.freedesktop.org/libreoffice/core/commit/?id=5813660e7bfe128ac076e592fe31de64a6863780
Comment 1 Samuel Mehrbrodt (allotropia) 2016-11-25 08:38:18 UTC
*** Bug 63256 has been marked as a duplicate of this bug. ***
Comment 2 Akshay Deep 2016-11-30 14:44:09 UTC
If anyone's going to work on this easyhack, One will need to implement functions such as move, copy, delete, rename, set as default, etc in the custom list view widget. Similar implementation can be found in templatelocalview.cxx which renders thumbnail view in the template manager.

http://opengrok.libreoffice.org/xref/core/sfx2/source/control/templatelocalview.cxx
Comment 3 abhilash300singh 2017-01-21 04:58:43 UTC
Hi Samuel, Akshay. 

mpLocalView(http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/templatedlg.cxx#162) seems to be handling the thumbnails and mpSearchView seems to handle the same for the searched results. As is done in the icon/list view patch Samuel mentions above, I'll have to replace mpLocalView with "mpCurView" and set it dynamically to either the listview or thumbnailview. 

I can't figure out what the type of "mpCurView" should be. In the reference patch, both list/icon views derive from a parent class SvTreeListBox ( https://docs.libreoffice.org/svtools/html/classSvTreeListBox.html ). I also need some help in figuring out code organization into different files and breaking this task into smaller parts that I can build upon. As of now, I've only made necessary changes in .ui file and defined click handlers. The WIP patch is here - https://gerrit.libreoffice.org/#/c/33356/

Thanks.
Comment 4 Samuel Mehrbrodt (allotropia) 2017-01-24 07:40:38 UTC
(In reply to abhilash300singh from comment #3)

Hi Abhilash, please come to IRC and lets discuss this there.
Comment 5 Akshay Deep 2017-01-24 10:57:27 UTC
Hi Samuel, Abhilash,
I can think of a slightly different approach here. It will be good to subclass SvSimpleTable class to create a custom widget which displays lists of templates along with their properties. All the features can be implemented in the custom widget similar to TemplateLocalView. It can then be dynamically shown or kept hidden according to the user preference.
Similar work of creating a custom list view has been seen here: https://cgit.freedesktop.org/libreoffice/core/commit/?id=08da15cabdcef60191f4ed98ed694eba3e35b5e1

when the user switches from listview to thumbnailview or vice-versa, controls can just be reloaded. See-> TemplateLocalView::Reload and a similar function in the list view widget has to be implemented.

After this is done, other tasks such as move, copy, delete, rename, search, etc can be implemented to the custom listview widget.
Comment 6 Yousuf Philips (jay) (retired) 2017-02-04 11:42:44 UTC
I would be against implementing a list view for the template manager, which was previously there in the old template manager inherited from OOo and purposely left out of the new template manager implementation.

(In reply to Samuel Mehrbrodt (CIB) from comment #0)
> Currently the Template Manager only has a thumbnail view.
> Users with many templates wish to have a list view because they are used to
> find a template by its name instead of by its preview (there might be many
> similiar templates), and because loading the preview can take a considerable
> time.

We have a search field in the template manager to find a template by name.

> The same functionality can be seen in the remote files dialog
> (File->Open->Remote file).

The template manager isnt a file browser like the remote files dialog, so it isnt a correct comparison.

@abhilash300singh: If you have begun coding this, i would temporarily stop until the issue is decided on by the UX team.

@Heiko, @Stuart: Any thoughts?
Comment 7 Heiko Tietze 2017-02-04 13:43:13 UTC
(In reply to Yousuf Philips (jay) from comment #6)
> @Heiko, @Stuart: Any thoughts?

Not when it comes to the template manager.
Comment 8 jani 2017-05-14 07:43:29 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2017-06-14 02:22:47 UTC Comment hidden (obsolete)
Comment 10 Yousuf Philips (jay) (retired) 2017-06-14 13:57:54 UTC
Lets close this as UX-Team doesnt agree to this enhancement.
Comment 11 Samuel Mehrbrodt (allotropia) 2017-06-14 14:44:13 UTC
(In reply to Yousuf Philips (jay) from comment #10)
> Lets close this as UX-Team doesnt agree to this enhancement.

Please don't close valid enhancement requests. This has been asked for by several users and it's not the task of the UX team to block useful enhancements.
Comment 12 V Stuart Foote 2017-06-14 15:08:20 UTC
Would argue it is exactly the Design/UX teams role to quash "feature creep" of unattainable "enhancements".

But in this instance I agree with Samuel's original posting. 

And I would add that similar to the desire for a list based view of templates--there is an enhancement request for the StartCenter to optionally render the MRU as a listing rather than just thumbnail views, bug 95739--and while Samuel closed that as WONTFIX, other work on the StartCenter, i.e. bug 96383 and similar (as pushed out to 6.0) would need some capability for a list view.

As with the shared Thumbnail view(s) (Templates and StartCenter MRU) a shared List view(s) mode for Template and StartCenter MRU is reasonable development.
Comment 13 Yousuf Philips (jay) (retired) 2017-06-14 19:52:57 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #11)
> Please don't close valid enhancement requests. This has been asked for by
> several users and it's not the task of the UX team to block useful
> enhancements.

It is the UX team's responsibility to close enhancement requests that they deem invalid, even if many users request such a feature. The issue is now set to be discussed at tomorrow's design meeting, so hope you'll join so we can resolve this issue.

And as you stated in bug 95739 comment 3, "this is by design", and this was how I designed it in the redesign.
Comment 14 Cor Nouws 2017-06-14 20:45:53 UTC
(In reply to Yousuf Philips (jay) from comment #13)

> And as you stated in bug 95739 comment 3, "this is by design", and this was
> how I designed it in the redesign.

And maybe you did notice that that redesign falls short in some serious use cases ;)
Comment 15 Cor Nouws 2017-06-14 21:05:08 UTC
I wonder why people would not allow this to be implemented :) as there is a request with IMO valid arguments:
- for may templates the current (cute) view is not handsome
- the old template manager had a list view
Comment 16 Cor Nouws 2017-06-14 21:05:54 UTC
(In reply to Cor Nouws from comment #15)

> - for may templates the current (cute) view is not handsome
        many
Comment 17 Heiko Tietze 2017-06-15 12:13:56 UTC
We agreed in the design meeting that a list view makes sense only when it adds functionality by more columns. Having only the names of the templates as a list is not beneficial to users. So we should introduce creation and last modification datetime and user and show this in the list view together with size, maybe the location and perhaps a favorite flag (would be a new feature).

Guess it's not an easy hack anymore.
Comment 18 Yousuf Philips (jay) (retired) 2017-06-15 17:46:52 UTC
(In reply to Heiko Tietze from comment #17)
> creation and last modification datetime

Modified datetime yes. Creation datetime no, as it isnt supported by all platforms.

> user

yes

> size

yes

> maybe the location and perhaps a favorite flag (would be a new feature).

path would likely be a huge column, so if added should be the last column. not sure what favorite flag is or how it would be implemented, but ideally it would also be there in thumbnail view as well.
Comment 19 Heiko Tietze 2017-06-15 19:20:06 UTC
(In reply to Yousuf Philips (jay) from comment #18)
> Modified datetime yes. Creation datetime no, as it isnt supported by all
> platforms.

We could take it from the document properties. There are plenty of fields that might be interesting.

> path would likely be a huge column

Not the relative path like <Templates>/School/Homework/*, <Templates>/School/Reports/* (<Templates> hidden).

> not sure what favorite flag is or how it would be implemented, but ideally
> it would also be there in thumbnail view as well.

Just an icon (star usually) to click on, making an object (the template here) a favorite, or not.
Comment 20 Yousuf Philips (jay) (retired) 2017-06-16 17:14:14 UTC
(In reply to Heiko Tietze from comment #19)
> We could take it from the document properties. There are plenty of fields
> that might be interesting.

Yes i guess you are right.

> Not the relative path like <Templates>/School/Homework/*,
> <Templates>/School/Reports/* (<Templates> hidden).

Templates are pulled from multiple folders, by default 3 folders on my system, so you cant really use relative paths.

> Just an icon (star usually) to click on, making an object (the template
> here) a favorite, or not.

Yes i understand the idea, so i'm guessing it would need to be saved in the user profile, but not sure you could have a clickable star icon in a grid view.
Comment 21 Heiko Tietze 2017-06-17 10:33:39 UTC Comment hidden (obsolete)
Comment 22 Heiko Tietze 2017-06-22 12:15:06 UTC Comment hidden (obsolete)
Comment 23 V Stuart Foote 2017-06-22 13:13:57 UTC Comment hidden (obsolete)
Comment 24 Xisco Faulí 2017-06-22 13:37:39 UTC Comment hidden (obsolete)
Comment 25 Heiko Tietze 2017-06-23 07:20:15 UTC Comment hidden (obsolete)
Comment 26 Roman Kuznetsov 2020-09-26 21:02:18 UTC
https://gerrit.libreoffice.org/c/core/+/103418
Comment 27 VertD 2020-09-26 22:53:22 UTC
Hello, I've saw this still marked as new so I begun working on this. 
I added some columns as it was accorded in the comments(tell me if I should remove or add more) and tried to add some functionality by enabling sorting. You can also switch from thumbnail to list view and the selection is remembered as it was suggested here. Here is the WIP patch https://gerrit.libreoffice.org/c/core/+/103418
Comment 28 Heiko Tietze 2020-09-28 08:09:02 UTC
Great work! Just a few nitpick (commenting on Gerrit).
Comment 29 Commit Notification 2020-11-23 10:30:21 UTC
Vert D committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6b1de6057082bd8720594231839f967bff5372ae

tdf#104154 WIP:Add list view to template manager

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 sdc.blanco 2020-12-13 23:59:27 UTC
Created attachment 168135 [details]
show problematic appearance

(In reply to Commit Notification from comment #29)
> Vert D committed a patch related to this issue.
Thanks for this.  Really helpful.

> Affected users are encouraged to test the fix and report feedback.
Attachment shows appearance of Modified field, where an extra character appears at end of each modifytime.  Only aesthetic problem afaik.

Tested with:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 368c56144aab5794c39d5bc2082d9b3d6d7cebdb
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: threaded
Comment 31 Adolfo Jayme Barrientos 2020-12-23 11:00:21 UTC
↑ That should be sorted out with commit 421d3fe399e798212fb6c1a14b4f2de1e545eb3c