Label: Add ping-pong logic
Needs RevisionPublic

Authored by patrickelectric on May 7 2020, 3:43 PM.


Group Reviewers

Add friendly ping-pong animation to allow visibility of full text
in an animated way

Signed-off-by: Patrick José Pereira <>

Diff Detail

R242 Plasma Framework (Library)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 26519
Build 26537: arc lint + arc unit
patrickelectric created this revision.May 7 2020, 3:43 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 7 2020, 3:43 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
patrickelectric requested review of this revision.May 7 2020, 3:43 PM
cblack added a subscriber: cblack.

You should include a video in the test plan since you're creating visual changes with motion.

patrickelectric added a comment.EditedMay 7 2020, 3:48 PM

@cblack Yeah, I was uploading it :)

ognarb requested changes to this revision.EditedMay 7 2020, 3:51 PM
ognarb added a subscriber: ognarb.

I'm not sure it is a good idea, but at least for me it break the clock in my panel.

Edit: in mp4

This revision now requires changes to proceed.May 7 2020, 3:51 PM
davidedmundson requested changes to this revision.May 7 2020, 4:06 PM
davidedmundson added a subscriber: davidedmundson.

Plasmacomponents is deprecated please see Plasmacomponents3 then see the readme within that and put this somewhere else.

  1. Label is a super super super common element we don't want to add any overhead instantiating a label. A new special class would be best
  2. It can all be done in one SequentialAnimation, you don't need states.
  3. You don't need to get the width again, we know this already from the other text properties.
  4. This is broken for any text that's wrapped or elided

Thanks @davidedmundson and @ognarb, I was able to replicate the issue, I'll think a bit more in my approach

apol added a subscriber: apol.May 10 2020, 5:22 PM

I feel like this could break Labels unknowingly. Maybe it would make sense to have an extra scrollToFit (?) property or even another separate component to do that.

Seeing things bouncing without the author intending could be worse than having the text cut off.

ngraham requested changes to this revision.May 10 2020, 5:54 PM
ngraham added a subscriber: ngraham.

Yeah, This should be a new component, or at most enabled by an off-by-default property. The default behavior should not change.