Skip to content

UI: Add header to the permissions view, add search field to the apps list

ivan tkachenko requested to merge work/ratijas/add-header into master

image

Previous version of this screenshot

image

UI: Add header with current app icon, name & version to the permissions view

Given the way how ListView works with currentIndex, and easy it is to get it out of sync with kcm's current app index -- especially when it comes to filtering model with search -- it would be better to show some identifying information on the permissions page. Also good for mobile form-factor where pages might only be displayed one at a time.

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.
Edited by ivan tkachenko

Merge request reports