Bug 495378

Summary: Fit-content panel with flexible spacer animates its expansion to full screen edge size on Plasma launch
Product: [Plasma] plasmashell Reporter: volodarolathana
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: nate, niccolo.venerandi, yb21com
Priority: NOR    
Version: 6.2.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.4
Sentry Crash Report:

Description volodarolathana 2024-10-26 12:36:51 UTC
SUMMARY
Fit-content setting with a spacer inside the panel, with flexible setting, causes abnormal animations on login

STEPS TO REPRODUCE
1. create a new panel with fit-content setting
2. add a spacer with flexible setting
3. re-login

OBSERVED RESULT
abnormal animations

EXPECTED RESULT
a spacer should cause the panel to take all the space without having to cause abnormal animations
Comment 1 volodarolathana 2024-10-26 13:07:34 UTC
after some further troubleshooting, 
one more condition is neccesary for reproduction:
i.e disable date from the clock widget.
Comment 2 volodarolathana 2024-10-26 15:56:10 UTC
not reproducible with icons-only task manager btw
Comment 3 Nate Graham 2024-10-28 03:56:26 UTC
Can you attach a screen recording or a phone video that shows it happening?
Comment 4 volodarolathana 2024-10-29 19:47:41 UTC
sure, 
https://imgur.com/a/VT0n4F2
Comment 5 volodarolathana 2024-10-29 19:50:51 UTC
the current setup has: (left to right)
- application dashboard 
- window title 
- global menu
- spacer 
- notification tray/menu
- clock
- desktop

panel setting:
- fit content

spacer setting:
- flexible
Comment 6 volodarolathana 2024-10-29 19:51:14 UTC
hope that helps
Comment 7 Nate Graham 2024-10-30 15:20:26 UTC
Wow, I can reproduce the issue with a panel configured exactly like that.

In fact for me it's 100% reproducible with a fit-content panel with only a flexible spacer on it. Seems that combination causes this.
Comment 8 Bug Janitor Service 2024-10-30 16:56:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2611
Comment 9 Marco Martin 2024-11-07 13:30:14 UTC
Git commit 7d2e16b09d391b7bc979e447d21bc8747399c55d by Marco Martin, on behalf of Niccolò Venerandi.
Committed on 07/11/2024 at 13:11.
Pushed by niccolove into branch 'master'.

Fill panel width/height in custom/fit content modes when flexible spacer is in panel

The flexible spacer should always make the panel gain its maximum
width/height; this implements that.

M  +6    -0    containments/panel/contents/ui/main.qml
M  +14   -0    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/7d2e16b09d391b7bc979e447d21bc8747399c55d
Comment 10 Niccolò Venerandi 2024-11-07 13:30:30 UTC
Git commit 8789c9c2a847d2e1c83b8de7b915cf9888e68937 by Niccolò Venerandi.
Committed on 07/11/2024 at 13:30.
Pushed by niccolove into branch 'Plasma/6.2'.

Fill panel width/height in custom/fit content modes when flexible spacer is in panel

The flexible spacer should always make the panel gain its maximum
width/height; this implements that.


(cherry picked from commit 7d2e16b09d391b7bc979e447d21bc8747399c55d)

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>

M  +6    -0    containments/panel/contents/ui/main.qml
M  +14   -0    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/8789c9c2a847d2e1c83b8de7b915cf9888e68937
Comment 11 Yannick Bruneau 2024-11-12 00:13:07 UTC
I'm glad this issue seems to be resolved.
This is the issue I have and for which I had found a work around changing the panel option, not using fit to content while having flexible spacer.
I had looked at the reported bugs and added my comment to that bug report :
https://bugs.kde.org/show_bug.cgi?id=489086
But it looks like the other bug report is not exactly the same issue.
I have 2 flexible spacers in the panel, not just one.
I'll check whether it works for me when 6.2.4 is released in Arch Linux.