Label: Add ping-pong logic
Needs RevisionPublic

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

Details

Reviewers
ognarb
davidedmundson
ngraham
Group Reviewers
Plasma
VDG
Summary

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

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
ping_pong_text
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26519
Build 26537: arc lint + arc unit
patrickelectric created this revision.Thu, May 7, 3:43 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, May 7, 3:43 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
patrickelectric requested review of this revision.Thu, May 7, 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.EditedThu, May 7, 3:48 PM

@cblack Yeah, I was uploading it :)
Output:

ognarb requested changes to this revision.EditedThu, May 7, 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.Thu, May 7, 3:51 PM
davidedmundson requested changes to this revision.Thu, May 7, 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.Sun, May 10, 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.Sun, May 10, 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.