Add a SpinBox (with draggability) to panel thickness adjustment UI
ClosedPublic

Authored by ngraham on May 8 2020, 3:51 PM.

Details

Reviewers
abetts
mart
Group Reviewers
VDG
Plasma
Summary

We receive many complaints and bug reports about the current UI for adjusting panel
thickness. People don't figure out that they have to drag on the button, and when they do,
they complain that it's too hard to set the value finely enough.

This patch removes the draggable button and replaces it with a more conventional SpinBox,
which in D29534 is given ability to adjust the values by scrolling over it or clicking and
dragging. This yields the following improvements:

  • The way you adjust panel thickness is now more obvious
  • The existing drag-to-adjust behavior is much nicer and less buggy
  • Panel thickness can now be specified numerically
  • Fine-tuning panel thickness is now easier using any adjustment method
  • We have one fewer custom control to maintain
  • Bugs in custom scrolling implementation go away

Touch friendliness is maintained because this SpinBox has an inherently touch-friendly design
with large touchable buttons that can be held down to quickly adjust the value, and touch-and
-drag still works after D29534 is applied.

I wouldn't mind using this SpinBox design elsewhere too; see T9460.

BUG: 418700
BUG: 421169
FIXED-IN: 5.19

Test Plan


Diff Detail

Repository
R119 Plasma Desktop
Branch
panel-adjustment-adjustment (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26594
Build 26612: arc lint + arc unit
ngraham created this revision.May 8 2020, 3:51 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 8 2020, 3:51 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.May 8 2020, 3:51 PM
cblack added a subscriber: cblack.May 8 2020, 3:54 PM
cblack added inline comments.
desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml
119–120

These values seem arbitrary. Could it be possible to base off the screen dimensions?

ngraham edited the summary of this revision. (Show Details)May 8 2020, 3:54 PM
abetts added a comment.May 8 2020, 3:57 PM

I love this idea. I would request to keep the drag behavior and follow up with a second ticket to propose a change in the drag behavior for the panel.

ngraham updated this revision to Diff 82280.May 8 2020, 4:00 PM
ngraham marked an inline comment as done.

Use less arbitrary min and max values

I love this idea. I would request to keep the drag behavior and follow up with a second ticket to propose a change in the drag behavior for the panel.

I considered that, but while implementing it and playing with the result I became less and less convinced that a drag-based interaction makes sense here. Dragging favors large movements where precision of the final result is not important, which is pretty much the opposite of how people adjust their panels.

An idea brought up by @ahiemstra would be to add dragability into the SpinBox control itself, which was suggested in T9460 and would automatically re-implement/preserve draggability. I can look into that.

ngraham edited the summary of this revision. (Show Details)May 8 2020, 8:29 PM
ngraham edited the test plan for this revision. (Show Details)
ngraham planned changes to this revision.May 8 2020, 8:33 PM

Need to re-implement the panel thickness change handling

ngraham edited the test plan for this revision. (Show Details)May 8 2020, 8:39 PM
abetts added a comment.May 8 2020, 8:48 PM

+1 from me!

ngraham updated this revision to Diff 82324.May 8 2020, 9:38 PM

Move the config bar as the panel changes thickness

Managed to re-introduce https://bugs.kde.org/show_bug.cgi?id=414045, so it looks like that's not related to this. Will fix it in another patch.

ngraham edited the summary of this revision. (Show Details)May 8 2020, 9:40 PM
ngraham retitled this revision from Change panel thickness adjustment UI to use a SpinBox to Add a SpinBox (with draggability) to panel thickness adjustment UI.May 9 2020, 2:05 AM
ngraham edited the summary of this revision. (Show Details)
mart added a comment.May 11 2020, 4:02 PM

Sorry, i don't think it's the right path, for several reasons,

  • The spinbox look is different from the desktop one, better or worse is secondary, but it's actually a sore point of the plasma theme at the moment :/
  • It exposes very directly pixel numbers in the ui, unless it's a graphic application, i hate when it happens in an ui and in our software happens too much (and no, no user should ever be asked to know what a pixel is)
  • it keeps the window still when the panel resizes, looking kinda broken, but worse, making even possible for the panel to cover up the spinbox itself
mart accepted this revision.Jun 12 2020, 2:40 PM

after discussing it a bit thoroughly during the sprint we came to the conclusion is the best solution for now

This revision is now accepted and ready to land.Jun 12 2020, 2:40 PM
ngraham closed this revision.Jun 12 2020, 2:47 PM