Bug 459996

Summary: Applet inappropriately switches years or decades when dragging/swiping up or down on the calendar view
Product: [Plasma] plasmashell Reporter: Nico <nico>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, tantalising007
Priority: NOR Keywords: regression
Version First Reported In: 5.25.90   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.27
Sentry Crash Report:
Attachments: Screen recording showing the behavior

Description Nico 2022-10-05 07:00:58 UTC
Created attachment 152590 [details]
Screen recording showing the behavior

SUMMARY
Clicking and dragging the calendar switches years in a weird way


STEPS TO REPRODUCE
1. Open the Digital clock applet
2. Click and hold
3. Drag up or down

OBSERVED RESULT
Show the actual previous/next month

EXPECTED RESULT
Switches years in a weird way (see attached video)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Comment 1 Nate Graham 2022-10-09 23:53:14 UTC
Whoa, can reproduce.
Comment 2 tantalising 2022-10-10 06:19:01 UTC
(In reply to Nate Graham from comment #1)
> Whoa, can reproduce.

Why don't we see it as a power feature? Like change dates very fast just by swiping? 

But anyway, the way it's been implemented using swipeview, fixing it would be very difficult. This problem could have never occurred if I had just never bothered to add swiping behaviour. That's a potential fix. Remove swiping and all good. But is that acceptable?
Comment 3 Nate Graham 2022-10-10 19:10:38 UTC
I don't think we can consider this a hidden feature; it makes swiping error-prone since it will often go much farther that you intend.

Removing the feature that's buggy just because it's buggy is always sad; I'd prefer if we can try to find a fix if possible.
Comment 4 tantalising 2022-10-13 07:29:15 UTC
(In reply to Nate Graham from comment #3)
> I don't think we can consider this a hidden feature; it makes swiping
> error-prone since it will often go much farther that you intend.
> 
> Removing the feature that's buggy just because it's buggy is always sad; I'd
> prefer if we can try to find a fix if possible.

Unfortunately I will remain very busy for coming two months. I am working on this and I hope I can land an MR within two months.
Comment 5 Nico 2022-10-14 10:47:54 UTC
Btw if I remember it correctly this is a regression. I think it worked fine a few Plasma versions ago
Comment 6 Bug Janitor Service 2022-10-19 10:36:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2236
Comment 7 Nate Graham 2022-12-15 16:23:12 UTC
Git commit cdf4c40d8b153680459c5b9ef19c4efcf9d1c0fe by Nate Graham, on behalf of Tanbir Jishan.
Committed on 15/12/2022 at 16:23.
Pushed by ngraham into branch 'master'.

components/calendar: New and improved swipe implementation for calendar views

This commit replaces the old implementation based on swipeview and uses listivew instead.
Logic is simplified and components are loaded dynamically now. This fixes an existing bug
as well, where swiping could change dates very fast. Now it does not change until swiped
very far.
FIXED-IN: 5.27

M  +0    -8    components/calendar/qml/DaysCalendar.qml
M  +183  -190  components/calendar/qml/InfiniteList.qml
M  +21   -34   components/calendar/qml/MonthView.qml

https://invent.kde.org/plasma/plasma-workspace/commit/cdf4c40d8b153680459c5b9ef19c4efcf9d1c0fe