Show if KRunner is still searching for more things
ClosedPublic

Authored by apol on Jul 17 2019, 4:50 PM.

Details

Summary

Shows a busy indicator in the TextField.

Depends D22723.

BUG: 409959

Test Plan

Searched things, eventually it disappears, I sometimes don't really know what's still doing, maybe we could add some more information at some point.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jul 17 2019, 4:50 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 17 2019, 4:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Jul 17 2019, 4:50 PM

This overlaps the clear button:


You might want to set some additional padding on the TextField and use acutal icon size:

var actionIconSize = Math.max(control.height * 0.8, units.iconSizes.small);

Can you delay showing the busy indicator a bit? e.g. only show if there haven't been any new results for 500ms or so, to avoid that thing constantly flashing up. Perhaps easiest would be something like

Timer {
    id: delayBusyIndicatorTimer
    interval: 500
}

BusyIndicator {
    visible: !delayBusyIndicatorTimer.running && results.queryActive
}

onQueryStringChanged: delayBusyIndicatorTimer.start()

Also, it would be lovely to animate its appearance/disappearance instead of just using visible

apol planned changes to this revision.EditedJul 25 2019, 11:45 AM
apol edited the summary of this revision. (Show Details)

Yes.

Please review D22540 so I can offer a better solution for @broulik's concerns.

In D22514#502062, @apol wrote:

Please review D22540 so I can offer a better solution for @broulik's concerns.

You already fixed all of those, right?

IMHO the busy indicator should appear next to the results list, for example right on top of it, because the busy indicator is related to the results, not to the input text. A busy indicator in TextField might be understood as if something is going to happen inside that text field.

In D22514#502062, @apol wrote:

Please review D22540 so I can offer a better solution for @broulik's concerns.

You already fixed all of those, right?

IMHO the busy indicator should appear next to the results list, for example right on top of it, because the busy indicator is related to the results, not to the input text. A busy indicator in TextField might be understood as if something is going to happen inside that text field.

I would tend to agree.

Also now it's driving me slightly crazy that the Plasma busy indicator has a different look from the QQC2-desktop-style one! :)

apol updated this revision to Diff 64264.Aug 22 2019, 1:23 AM

Use the new querying property

apol updated this revision to Diff 64265.Aug 22 2019, 1:26 AM

positioning

Seems to work. There's some comments from Kai above.

lookandfeel/contents/runcommand/RunCommand.qml
86

Does using Kirigami.ActionTextField help with positioning?

apol added inline comments.Aug 22 2019, 2:18 PM
lookandfeel/contents/runcommand/RunCommand.qml
86

Since it's using QQC2.TextField, won't it be using a completely different colour scheme?

davidedmundson added inline comments.Aug 22 2019, 5:20 PM
lookandfeel/contents/runcommand/RunCommand.qml
86

There was some code to make that magically work.

(maybe it was that URLInterceptor we removed?)

If it doesn't work, then just ignore me.

apol added inline comments.Aug 23 2019, 10:14 AM
lookandfeel/contents/runcommand/RunCommand.qml
86

We need more magic.

apol edited the summary of this revision. (Show Details)Aug 23 2019, 1:34 PM
mart added a subscriber: mart.Aug 23 2019, 1:41 PM
mart added inline comments.
lookandfeel/contents/runcommand/RunCommand.qml
86
(maybe it was that URLInterceptor we removed?)

yep :)

(there may be things in the systemmotitor applets that *may* break if the urlinterceptor stuff is reintroduced tough (would need to be tested)

Testing this out, the spinner never seems to go away, even after the results list has stopped changing.

Never mind, I didn't have the whole stack built. This works well.

I feel like I might prefer to have the spinner overlaid on top of the results view like @aspotashev suggested, inside a dark transparent rounded rectangle, maybe. That would visually connect the spinner to the results, rather than implying that the text field itself is still processing things.

Not a huge deal though, and I can see how that might be kind of annoying if it's obscuring the results that you want to look at.

ngraham accepted this revision as: VDG.Aug 23 2019, 2:47 PM

Then again, now that I'm trying that out, it might be kind of annoying, and it wouldn't show up well when using a dark theme.

All right, let's go with this.

broulik requested changes to this revision.Aug 23 2019, 2:50 PM

Can you please add the delay for when the spinner shows up. (And the opacity animation perhaps)

This revision now requires changes to proceed.Aug 23 2019, 2:50 PM
broulik added inline comments.Aug 26 2019, 11:15 AM
lookandfeel/contents/runcommand/RunCommand.qml
105

Easier would be !queryTimer.running && results.querying, then you don't need any of the custom state tracking

And then just onQueryStringChanged: queryTimer.restart()

Also, maybe longer than 200ms?

apol updated this revision to Diff 64655.Aug 26 2019, 1:13 PM

simplify

apol marked an inline comment as done.Aug 26 2019, 1:14 PM
broulik accepted this revision.Aug 26 2019, 1:49 PM

I still think it should be more than 200ms, more like 500ms.

lookandfeel/contents/runcommand/RunCommand.qml
103

The BusyIndicator is always visible

This revision is now accepted and ready to land.Aug 26 2019, 1:49 PM
This revision was automatically updated to reflect the committed changes.