Prettify display of URLs in Recent Folders and Places
ClosedPublic

Authored by rkflx on Mar 19 2018, 4:59 PM.

Details

Summary

Entries in the Recent Folders tab on the Start Page
contained superfluous information like file:// for local folders and
the user's home directory, taking away valuable space and unnecessarily
eliding the text:

file:///home/user/Documents/

By abbreviating to ~ and omitting the protocol for local folders, the
entries can look much neater, making them faster to scan for users:

~/Documents/

The changes not only affect the Recent Folders tab, but also what
is displayed in the Recent Files tab and the hover overlays for
very long entries.

In addition, adding folders to the Places panel now uses the last
subfolder for naming the entry, bringing the behaviour in line with
Dolphin.

BUG: 383850
FIXED-IN: 18.04.0

Test Plan
  • Inspected Recent Folders and Recent Files on the Start Page.
  • In Browse mode, used FileAdd Folder to Places.
  • Tested that remote paths containing ~ are still intact.

Before:

After:

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rkflx requested review of this revision.Mar 19 2018, 4:59 PM
rkflx created this revision.
muhlenpfordt accepted this revision.Mar 20 2018, 9:38 AM
muhlenpfordt added a subscriber: muhlenpfordt.

Looks good to me - code and Start Page. ;)
What do you think about displaying /home/user/ just as ~? Personally I would prefer this. ;)

This revision is now accepted and ready to land.Mar 20 2018, 9:38 AM

Looks good to me - code and Start Page. ;)
What do you think about displaying /home/user/ just as ~? Personally I would prefer this. ;)

I wouldn't recommend it. Most normal users don't know that ~ is a shorthand for "my home folder", and we should keep in mind Gwenview's target user.

rkflx added a comment.Mar 20 2018, 2:23 PM

Looks good to me - code and Start Page. ;)
What do you think about displaying /home/user/ just as ~? Personally I would prefer this. ;)

I wouldn't recommend it. Most normal users don't know that ~ is a shorthand for "my home folder", and we should keep in mind Gwenview's target user.

Yup, that was my motivation: Give "normal" users something to hold onto, so I'm showing /home/user and ~/Pictures, but not only ~. I understand where Peter is coming from, though ;)

Most normal users don't know that ~ is a shorthand for "my home folder", and we should keep in mind Gwenview's target user.

I already feared that. ;)

This revision was automatically updated to reflect the committed changes.