touch: bug fixes and general improvements
ClosedPublic

Authored by z3ntu on Jan 1 2020, 7:45 PM.

Details

Summary

Bug fixes:

  • Add padding to the right side in the directory selection with the size of the dragMargin from the context drawer, otherwise the "up" icon is not clickable in Plasma Mobile
  • Don't pop the pageStack when it would be made empty

Other improvements:

  • Wrap raw strings in qsTr for i18n
  • Add empty states to recipe & directory list
  • Increase the touch areas for icon buttons
  • Remove unused Rectangle from FileOpen.qml and MainPage.qml
  • Add smooth property to images in search bar to make them look nicer
Test Plan

Tested on the PinePhone running postmarketOS with Plasma Mobile
Tested on x86_64 Plasma Desktop

Diff Detail

Repository
R1029 Cookbook Creator
Branch
arcpatch-D26353
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22214
Build 22232: arc lint + arc unit
z3ntu requested review of this revision.Jan 1 2020, 7:45 PM
z3ntu created this revision.
svuorela accepted this revision.Jan 1 2020, 7:57 PM
This revision is now accepted and ready to land.Jan 1 2020, 7:57 PM
ngraham requested changes to this revision.Jan 1 2020, 8:13 PM
ngraham added a subscriber: ngraham.

..and so on

src/touch/qml/FileOpen.qml
71

Why not just put this inside the Icon? Seems redundant to put both inside an Item

89

Ditto

139

Doesn't need an exclamation point

139

i18n(), not qstr()

140

avoid bold font. In fact, this should probably have opacity: 0.6 to match other "there's nothing here" placeholder text used in other apps.

src/touch/qml/Help.qml
26

i18n(), not qstr()

This revision now requires changes to proceed.Jan 1 2020, 8:13 PM
z3ntu added inline comments.Jan 1 2020, 8:18 PM
src/touch/qml/FileOpen.qml
71

I did that so the clickable area is bigger than the icon - clickable area: https://i.imgur.com/PogLuij.png , icon area: https://i.imgur.com/mw4NAt9.png

ngraham added inline comments.Jan 1 2020, 10:19 PM
src/touch/qml/FileOpen.qml
71

Perhaps instead you could use a Button with flat: true and an overridden width and height. That would get you the same thing in one item, and it would have proper animations and visual states for hover and tap/click.

z3ntu updated this revision to Diff 72799.Jan 5 2020, 3:39 PM
z3ntu marked 2 inline comments as done.
  • Adjust empty state style and text
  • Use i18n instead of qsTr
z3ntu marked 2 inline comments as done.Jan 5 2020, 3:42 PM
z3ntu added inline comments.
src/touch/qml/FileOpen.qml
71

I've tried the following but I never got the icon to show up. I couldn't figure out why though, see also the messages in #kde-devel

Controls.Button {
    anchors.verticalCenter: parent.verticalCenter
    height: parent.height
    width: height
    flat: true
    icon.name: "go-parent-folder"
    onClicked: {
        dirmodel.cdUp()
    }
}
svuorela requested changes to this revision.Jan 5 2020, 3:51 PM
svuorela added inline comments.
CMakeLists.txt
15 ↗(On Diff #72799)

Nope. We don't require any KF5 parts for kookbook build.

If that's required for KDE translation system, then we must stick with Qt translation system

This revision now requires changes to proceed.Jan 5 2020, 3:51 PM
z3ntu updated this revision to Diff 75227.Feb 8 2020, 10:46 AM
  • empty states
  • i18n
  • Revert "i18n"
ngraham resigned from this revision.Feb 8 2020, 5:19 PM
svuorela accepted this revision.Feb 17 2020, 7:30 PM
This revision is now accepted and ready to land.Feb 17 2020, 7:30 PM
This revision was automatically updated to reflect the committed changes.