[Users] Tweak date_after/date_before criteria

Olivier Brunel jjk at jjacky.com
Wed Dec 19 18:07:03 CET 2018

Hey Colin, everyone,

So after upgrading to 3.17.2 I discovered the new criteria
date_after/date_before (nice additions btw) and as I was using them a
bit, I found myself in presence of a few little annoyances, nothing
major, but here's a patch to see about resolving them.

- when editing date criteria, having the calendar always visible was
  not good for me. I'm sure other people/setup will have different
  experiences, and my window may not be as tall as others, but for me
  it made things quite ugly, and worse, because the calendar eats up so
  much space the list of rules was basically reduced down to be
  unreadable/invisible, which I find to be a big usability issue.
  So, instead have a button for the date, that will pop up the calendar
  on demand.

- I was also unhappy with the time selection and the long list of
  times, so switched to three spin buttons. I find it makes it easier
  to set a specific time (esp. via middle/right click on arrows) and
  also fixes the issue that previously only time with seconds worked but
  seconds weren't actually recognized/loaded in the UI, so they would be
  lost/reset to zero (And trying to set seconds in the entry would
  result in a "invalid hour" error.)

- Lastly, changed the way the parsing is done so that it's not just the
  entire time that is optional, but each elements. I.e. one can use
  "2018-7-4 14:18" and it'll work without having to specify seconds. I
  find that quite useful as often times one might not care about
  seconds, but it was required to specify them anyhow (else the entire
  time was ignored).
  Also, when time is not specified, default to 23:59:59 for date_after
  (and 00:00:00 for date_before, ofc). This feels better/more likely to
  match use expectations to me, because if one wants all messages before
  the 4th, one indeed usually expected messages from the 3rd or before,
  but not the 4th. But similarly, if one wants messages after the 4th,
  one would usually expect messages from the 5th or after, but not the
  4th (so long as they're not from 00:00:00).

Hopefully this all makes sense. Those criteria were a nice addition,
and IMO these little changes help make them even a bit better. Here's to
hoping I'm not alone there.


PS: Unless I missed it, it seems the addition of those criteria was
left out of the release notes. I assume this wasn't on purpose, and
maybe something to keep in mind for next release, as it might be worth
pointing out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Filtering-Tweak-date_after-date_before-criteria.patch
Type: text/x-patch
Size: 15444 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20181219/eef89d14/attachment.bin>

More information about the Users mailing list