Skip to content

applets/weather: Refactor and Visual improvements of the Notices view

Ismael Asensio requested to merge work/iasensio/weather-warnings into master

Refactor the Notices model and view

Simplify the notices model into a single list model, where the notice type is added as a property.

Now we can use a proper ListView with actual headers and a scrollbar. This fixes a historical issue where unwrapped text could make the applet wider.

Visual improvements for Warnings

  1. Improve the layout of the notices (warnings and watches), as a formatted tabbed list showing also their timestamp
  2. To access the expanded information link, use an information button instead of showing all the text as a link, which might make the text more difficult to read. Also hide the button when no link is provided.
  3. Add a Warning icon for the Notices tab, to make it more attention grabbing as these are usually emergency warnings.
BEFORE AFTER AFTER (env. Canada)
weather-warnings-kiel-before weather-warnings-kiel-after weather-notices-envcan
  1. use Kirigami.ListSectionHeader for the headers Remove the sections header (Depends on plasma-workspace!3735 (merged))
  2. Show flags for event priority

weather-notices-flags.png

Fortunately (for locals, not for debugging) is not that easy to trigger the Notices tab, so a tip for testing: go to https://www.dwd.de/DE/wetter/warnungen_gemeinden/warnWetter_node.html or https://weather.gc.ca/?layers=alert#wb-cont, and pick a place which is under some weather warning.

Depends on !519 (merged) and !520 (merged)

Edited by Ismael Asensio

Merge request reports