Make buttons in seach bar nicer (icon, tooltip, autoselect)
ClosedPublic

Authored by bruns on Apr 7 2019, 3:25 PM.

Details

Summary

The "Everywhere" button actually selects the home directory, so use
an appropriate label ("Your files") and add a "user-home" icon.

Pre-select the right button when entering search, depending on the
location where the "Find ..." action was triggered.

Add tooltips for both buttons, stating where to look for files. Most
importantly, this includes the full path for "From here".

Canonicalize the path correctly (always strip trailing slash), otherwise
QUrl::fileName() will be an empty string, resulting in "From Here (/)"

Do not hide the buttons in case the url is non-local, as it is confusing:

  1. The state depends on the previous search. When the user hits "Find" when browsing e.g an SMB share, the search was probably in the home dir.
  2. The current search location was hidden
  3. The user may want to do a local search, give the option to do so.

Diff Detail

Repository
R318 Dolphin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10596
Build 10614: arc lint + arc unit
bruns created this revision.Apr 7 2019, 3:25 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptApr 7 2019, 3:25 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
bruns requested review of this revision.Apr 7 2019, 3:25 PM
bruns added a comment.Apr 7 2019, 3:44 PM
localsmb share
old
new
bruns edited the summary of this revision. (Show Details)Apr 7 2019, 3:47 PM
elvisangelaccio requested changes to this revision.Apr 7 2019, 4:54 PM
elvisangelaccio added a subscriber: elvisangelaccio.
elvisangelaccio added inline comments.
src/search/dolphinsearchbox.cpp
90–91

const

140–141

Please update this comment ("Everywhere" should be removed).

402

Please update this comment as well.

This revision now requires changes to proceed.Apr 7 2019, 4:54 PM
bruns updated this revision to Diff 55697.Apr 7 2019, 5:13 PM

remove outdated comments referring to "Everywhere"

meven added a subscriber: meven.Apr 7 2019, 6:09 PM
meven added inline comments.
src/search/dolphinsearchbox.cpp
408–411

"My files" seems vague to me.
I would suggest "Personal folder" or something more precise, suggesting clearly home dir.

loh.tar added a subscriber: loh.tar.Apr 7 2019, 6:33 PM

I dislike tool tips :-(
Dolphin has only very few, and these are useful :-)

Any chance to keep the address line when showing the search stuff and use they as display field where is searched?

bruns added a comment.EditedApr 7 2019, 6:37 PM

I dislike tool tips :-(
Dolphin has only very few, and these are useful :-)

Any chance to keep the address line when showing the search stuff and use they as display field where is searched?

No, not with a huge amount of work. Have a look at the screenshots how the address currently looks.

Also, the search is not a canonical address which can matched to a simple hierarchy.

I don't like "My Files". We generally avoid this grammatical construction throughout KDE, because it's not clear from whose perspective "my" is using (the computer's own files?). And it just sounds really awkward ant patronizing IMO. I would recommend instead using the string Your files, <user name>'s files, or User files.

bruns updated this revision to Diff 55707.Apr 7 2019, 7:38 PM
bruns edited the summary of this revision. (Show Details)

use "Your files"
add one more point to summary, "From Here" could show the wrong path

bruns marked 2 inline comments as done.Apr 7 2019, 9:13 PM
bruns added inline comments.
src/search/dolphinsearchbox.cpp
90–91

see below, location = ...

bruns marked an inline comment as done.Apr 7 2019, 9:14 PM
ngraham accepted this revision as: ngraham.Apr 8 2019, 1:01 AM
elvisangelaccio added inline comments.Apr 8 2019, 8:10 PM
src/search/dolphinsearchbox.cpp
90–91

I meant for cleanedUrl (sorry if it was unclear)

bruns updated this revision to Diff 55788.Apr 9 2019, 12:58 AM

make const

bruns marked an inline comment as done.Apr 9 2019, 12:59 AM
elvisangelaccio accepted this revision.Apr 9 2019, 8:56 PM
This revision is now accepted and ready to land.Apr 9 2019, 8:56 PM
This revision was automatically updated to reflect the committed changes.