Bug 499871 - Changing months too fast leads to a re-triggered animation but no month change
Summary: Changing months too fast leads to a re-triggered animation but no month change
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Calendar widget (show other bugs)
Version: 6.3.0
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-12 11:40 UTC by fililip
Modified: 2025-03-03 15:49 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fililip 2025-02-12 11:40:03 UTC
SUMMARY
Changing months too fast leads to a re-triggered animation but no month change.

STEPS TO REPRODUCE
1. Open up the Calendar widget
2. Try to go back a few months by pressing the left/right button very fast

OBSERVED RESULT
The month does not change; the animation simply replays again and again

EXPECTED RESULT
Animations should not affect the currently displayed month value (maybe it'd be good to temporarily disable them for changes that are too fast and re-enable them when they are slow enough?)

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × AMD Ryzen AI 9 365 w/ Radeon 880M
Memory: 27.2 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Mathias Tillman 2025-03-01 12:49:36 UTC
Git commit aba4911be4fdd8c3bf20846555f4512700727f4f by Mathias Tillman.
Committed on 01/03/2025 at 12:39.
Pushed by mathiastillman into branch 'master'.

components/calendar: Fix previous/next buttons not always working

When you pressed the next or previous button in quick succession
it wouldn't always change the view since it waited for the animation
to end before actually changing the backend value.

Fix this by checking if we are moving through the velocity value,
and if so, trigger the next/previous in the backend.

M  +26   -18   components/calendar/qml/InfiniteList.qml
M  +2    -0    components/calendar/qml/MonthView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/aba4911be4fdd8c3bf20846555f4512700727f4f
Comment 2 Mathias Tillman 2025-03-01 14:24:16 UTC
Accidentally pushed the commit with the fix to the master branch (sorry!). Have created an MR here: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5275 so reopening until it's been approved.
Comment 3 Nate Graham 2025-03-02 17:36:59 UTC
Git commit b5050b45953181181dd9ee9e5e6e875140c08486 by Nate Graham, on behalf of Mathias Tillman.
Committed on 02/03/2025 at 16:55.
Pushed by ngraham into branch 'master'.

components/calendar: Fix previous/next buttons not always working

When you pressed the next or previous button in quick succession
it wouldn't always change the view since it waited for the animation
to end before actually changing the backend value.

Fix this by checking if we are moving through the velocity value,
and if so, trigger the next/previous in the backend.

M  +26   -18   components/calendar/qml/InfiniteList.qml
M  +2    -0    components/calendar/qml/MonthView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/b5050b45953181181dd9ee9e5e6e875140c08486
Comment 4 Nate Graham 2025-03-02 18:16:21 UTC
Git commit 8b82278b6384f06817a801a503a14f43a18ded28 by Nate Graham.
Committed on 02/03/2025 at 17:37.
Pushed by ngraham into branch 'Plasma/6.3'.

components/calendar: Fix previous/next buttons not always working

When you pressed the next or previous button in quick succession
it wouldn't always change the view since it waited for the animation
to end before actually changing the backend value.

Fix this by checking if we are moving through the velocity value,
and if so, trigger the next/previous in the backend.


(cherry picked from commit b5050b45953181181dd9ee9e5e6e875140c08486)

Co-authored-by: Mathias Tillman <master.homer@gmail.com>

M  +26   -18   components/calendar/qml/InfiniteList.qml
M  +2    -0    components/calendar/qml/MonthView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/8b82278b6384f06817a801a503a14f43a18ded28