[kcms/baloo] Refine UI and prepare for more indexing options in the future
ClosedPublic

Authored by ngraham on Mar 25 2020, 2:40 PM.

Details

Summary

This patch refines the UI added in D28025. The basic goal here is to to be able to choose
what type of indexing is done for each path (none, full, or metadata only). I wrestled
for a while with the best way to present this information and also allow it to be easily
changed and eventually settled on a combobox, given that it combines both functions into
one compact control.

The code is made flexible so that once metadata-only indexing is added in the future, it
will be easy to add the appropriate option into the UI.

Test Plan

Diff Detail

Repository
R119 Plasma Desktop
Branch
refine-baloo-kcm-ui (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24212
Build 24230: arc lint + arc unit
ngraham created this revision.Mar 25 2020, 2:40 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 25 2020, 2:40 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 25 2020, 2:40 PM
ngraham updated this revision to Diff 78455.Mar 25 2020, 2:42 PM

use onActivated: rather than onCurrentIndexChanged: for the combobox

bruns added a subscriber: bruns.Mar 25 2020, 2:56 PM

Try do imagine how the combobox will look like when you add 'Index hidden' to the config options.

bruns added a comment.Mar 25 2020, 3:05 PM

For the "Add folder setting...":
How about a config dialog after the File Dialog?

This may seem over the top for now, but the next step is to make the excludeFilters and mimetype filters configurabe from the KCM, and then also per folder.

Try do imagine how the combobox will look like when you add 'Index hidden' to the config options.

That would be fine. Comboboxes handle many options pretty well.

For the "Add folder setting...":
How about a config dialog after the File Dialog?

This may seem over the top for now, but the next step is to make the excludeFilters and mimetype filters configurale from the KCM, and then also per folder.

Oh, that's interesting! Sounds cool. We can probably add that post-file-selection dialog for the indexing settings that require it, but since not all will, I'm not sure it should be added for all of them.

bruns added a comment.EditedMar 25 2020, 3:54 PM

Try do imagine how the combobox will look like when you add 'Index hidden' to the config options.

That would be fine. Comboboxes handle many options pretty well.

I am more concerned how a user will handle it:

Disable + [Filenames+Tags+Comments ; Metadata(Authors,EXIF,etc) ; FullText] x [NotHidden ; All] -> 7 options

Such a complicated setup is probably not going to be typical, I expect. But for that we could have an Advanced Settings sheet that allows people to customize things with great detail. However we probably don't have to worry too much about that for the purpose of this patch since those advanced features haven't been made available to the UI yet.

bruns added a comment.Mar 25 2020, 4:02 PM

Such a complicated setup is probably not going to be typical, I expect. But for that we could have an Advanced Settings sheet that allows people to customize things with great detail. However we probably don't have to worry too much about that for the purpose of this patch since those advanced features haven't been made available to the UI yet.

Such a complicated setup is probably not going to be typical, I expect. But for that we could have an Advanced Settings sheet that allows people to customize things with great detail. However we probably don't have to worry too much about that for the purpose of this patch since those advanced features haven't been made available to the UI yet.

We already have 5 of the 7 options, only "Metadata" is new. Though, currently only as a global setting.

Right, so my intention was to make it easy to add a new entry to the combobox titled "Metadata-only indexing".

ndavis added a subscriber: ndavis.Apr 2 2020, 4:01 PM

Why isn't a checkbox better than a combobox here? Aren't there only 2 opposite choices here?

Currently there are only two choices, yes. However as mentioned before, one of the goals of this patch is to future-proof the UI for the addition of more options, which is coming soon.

ndavis accepted this revision.Apr 2 2020, 4:03 PM

Currently there are only two choices, yes. However as mentioned before, one of the goals of this patch is to future-proof the UI for the addition of more options, which is coming soon.

Oh right

LGTM

This revision is now accepted and ready to land.Apr 2 2020, 4:03 PM
This revision was automatically updated to reflect the committed changes.