Skip to content
Verified Commit f5952051 authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

UI: Add search field to the apps list

Some code had to be refactored:

 - Method shouldChange() was lifted out of delegate to the top level;
 - Dialog and all methods are now taking old/new app row indices;
 - Initial loading (onCompleted) now reuses changeApp() method.

Test plan:

 - open KCM without arguments;
 - open KCM with a valid ref (e.g. from Discover, or by passing --args);
 - switch to apps (both from loaded app view, and from an empty view);
 - make changes and switch apps, look out for prompt dialog;
 - Search field:
   * Type in search query, so that some apps match, hit Enter. First search
     result should get activated. Prompt dialog should appear if
     necessary.
   * Type in search query until there are no more search results, hit
     Enter. Prompt dialog should appear if necessary. Then, KCM should
     unload current app, and show a placeholder view.
   * Make changes, type in search query, press "Clear search" icon
     button. KCM should not attempt to switch apps, prompt dialog
     should not appear. There is actually a workaround for SearchField
     dispatching accepted() signal when clearing input this way.
   * Select some app. Type in search query, so that app matches.
     ListView selection should follow the app.
     + keep typing until the app no longer matches. Selection should
       disappear, but permissions view still be loaded.
     + clear search text letter by letter. Selection should reappear as
       soon as the app matches again, and should follow it as user keeps
       deleting filter text.
   * If confirmation dialog shows up while search field is focused, the
     dialog should take the focus away from search field.
parent b32a7ca2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment