D26640: [applets/weather] Port weather station picker to QQC2+ListView

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Jan 22 21:41:03 GMT 2020


broulik added a comment.


  Using `Kirigami.SearchField` would be nice, so Ctrl+F acts as a shortcut for getting back to the search field when focus jumped to the list.
  
  (And can we later improve that weird workflow where no providers are selected and the Search field is disabled for no immediately obvious reason? :)

INLINE COMMENTS

> WeatherStationPicker.qml:39
>          source = "";
> -        locationListView.forceActiveFocus();
> -
>          locationListModel.searchLocations(searchStringEdit.text, selectedServices);
>      }

You no longer hide the `noSearchResultsReport` label when a new query starts, awkwardly overlapping the busy indicator until the new one completes.

> WeatherStationPicker.qml:91
>              Layout.minimumWidth: implicitWidth
> +            focus: true
>              placeholderText: i18nc("@info:placeholder", "Enter location")

Maybe explicitly focus this it when the dialog opens again otherwise on subsequent opening of the dialog it will instead have whatever item was focused previously?

> WeatherStationPicker.qml:148
> +            delegate: QQC2.ItemDelegate {
> +                id: sourceDelegate
> +                width: locationListView.width

Unused `id`

> WeatherStationPicker.qml:165
> +                verticalAlignment: Text.AlignVCenter
> +                text: i18nc("@info", "No weather stations found for '%1'", searchStringEdit.text);
> +                wrapMode: Text.WordWrap

This should be set programatically when the query finishes like before instead of a binding. Otherwise you'll end up in the weird situation where it says "Nothing found for `foo`" and then you start typing a new query and it live updates to "Nothing found for `bar`" even though you didn't actually launch a new query

> ngraham wrote in WeatherStationPicker.qml:144
> I copied it from the notifications KCM :)

The notifications KCM doesn't wrap, though?

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D26640

To: ngraham, #vdg, #plasma, broulik
Cc: fvogt, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200122/35c96da1/attachment-0001.html>


More information about the Plasma-devel mailing list