Bug 472171

Summary: Weather applet tabs overlap
Product: [Plasma] kdeplasma-addons Reporter: n.parkanyi
Component: WeatherAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: 5.27.6   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.91.90
Attachments: screenshot showing the issue

Description n.parkanyi 2023-07-12 02:03:45 UTC
Created attachment 160240 [details]
screenshot showing the issue

SUMMARY
At least when using the Environment Canada backend, the "Details" tab ends up overlapping with the forecast whenever the "Notices" tab is present. See screenshot. For example, a thunderstorm watch in this case; I've also seen it happen with the wildfire smoke warnings.


STEPS TO REPRODUCE
Open the weather applet when a notice is in effect (could be tricky to reproduce, it may need to faked out somehow)



SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Comment 1 Bug Janitor Service 2023-12-30 20:53:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/519
Comment 2 Ismael Asensio 2024-01-03 20:04:28 UTC
Git commit 9f4525120cb6bf9b746915d6d19192c580890aaa by Ismael Asensio.
Committed on 03/01/2024 at 21:02.
Pushed by iasensio into branch 'master'.

applets/weather: Fix SwitchPanel dynamics

The QtQuick Container API changed since QtQuick.Controls 2.3
(Qt 5.10) deprecating `removeItem(index)`.

This can cause some issues when the pages are added and then
removed, for instance when some warnings appear, or by changing
the station to a different provider.

To fix this we need to refactor SwitchPanel into a model-based
Repeater structure that dynamically adds/removes the items
depending on the conditions (making items non-`visible` do not
work because they still occupy the space)
FIXED-IN: 5.91.90

M  +55   -91   applets/weather/package/contents/ui/SwitchPanel.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/9f4525120cb6bf9b746915d6d19192c580890aaa