Hi Marco, I have spent quite a few hours on porting Subsurface-mobile to Kirigami 1.0 and playing with the new features and options. I think this is coming along nicely. Many of the new things I like, the new naming feels natural, this is really a huge step forward.
But of course, if I'm writing an email like this, there are still a few things that I think could be improved. I have two patches that make a big difference in usability for Subsurface-mobile and a few bug reports and requsts for features... 1. handling the keyboard on iOS and Android - with Qt5.6 it's possible to do a better job at handling the bottom margin when the virtual keyboard opens and closes. I was able to still get this to go wrong occasionally, but I can't reproduce the error case, so my guess is that this is at least a massive improvement if not a fix. This is the first attached patch. 2. connected to this, if the keyboard opens, now the bottom of the page is the upper edge of the keyboard and the action button is shown at the right spot, but the drawer(s) and the drawer handle(s) are not moved up as well and as a result the drawer handles are hidden behind the keyboard. I looked at the code but didn't feel comfortable that I understood things in enough detail to try to fix this. 3. it seems that the titlebar is drawn on top of the page in some situations. I hacked around this in Subsurface-mobile by adding extra top margin to pages where I noticed it (DiveDetailsView.qml), but this does seem like a bug to me. 4. the OverlaySheet is nice. I like the functionality and the intuitive way to get rid of it. And I figured out that I can already tell when it gets flicked off-screen so that I can exit edit mode, so this is mostly good. But there are two issues: a) it would be really nice if it "snapped" to its natural position. So when you move it up and down (maybe to look at what all is there) and if you let go, it should jump back to a reasonable position, so if you pulled down but not far enough to flick if off the screen and then let go, the top of the sheet should snap back to the top (or just below the top) of the current page. And similarly if you push the sheet up and let go, have the bottom snap back into place. b) in order to be able to have the animations run when opening or closing the sheet one needs to call the open() and close() functions (makes sense). But if you want to open an OverlaySheet in a state transition all you can do is change properties, not call functions. Maybe there's a better way to do this, but I attached a patch that allows property changes to trigger the open() and close() functions. 5. the margin at the top when pulling down a list (e.g., our dive list) seems HUGE and unintuitive. It really looks like a bug to the user. But then Thomas explained what this was intended to do and it suddenly made sense. This exists in iOS as well; but there when you trigger it (not by pulling down but by a soft double tap on the magic button / finger print sensor) then the whole app jumps about as far down as you do (so my comment about HUGE may be wrong), but it shows the background behind the app and seriously blurs it to indicate that this is more than just white space, this is moving part of the screen closer to your thumb. Maybe you could do something similar? Change the background for the margin that you create there? Or move the title bar down as well with the upper end of the page and have something blurred out above? 6. the title bar is really cool - and thanks for providing the properties to control the min/preferred/max sizes. It would be neat if the application could get a tap event if the user taps on the title bar, If it handles it, then don't interpret this as navigation on the bread crumbs. But if the application doesn't handle it, then do. I guess this could be similar to the way you handle the back button? So a signal "titleTapped" or something like that? 7. as discussed at great length on the Subsurface list, I'd really want a couple more buttons :-) My preference would be to have five button positions. (hey, one can dream) left halfleft center halfright right The left and right buttons are each mutually exclusive with having a globalDrawer or a contextDrawer (respectively). So if the page defines both a right button and a contextDrawer, that's an error (and I guess the drawer simply gets preference). But even with both drawers available, that would give us three action buttons. Maybe there could be the option to have the center button be a little bigger - if it is the obvious, natural default action, but I'm not sure how that would look. Same size or LARGE small LARGE small LARGE might make sense... Ok, long email, lots of content, many ideas, many requests. At least I am bringing along two patches and I hope the issues that I report make sense and help to make Kirigami better! Thanks for all your hard work on this /D
>From 979b4cc61f6497b5583387ea6ca175dc2542139d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Fri, 1 Apr 2016 17:05:18 -0500 Subject: [PATCH 1/2] Update keyboard area hack for Qt 5.6 With Qt5.6 Android and iOS appear to be able to figure out the size of the keyboard, but they appear to not take into account whether the keyboard is visible. Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/qml/ApplicationWindow.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/ApplicationWindow.qml b/src/qml/ApplicationWindow.qml index 31671f5..308f367 100644 --- a/src/qml/ApplicationWindow.qml +++ b/src/qml/ApplicationWindow.qml @@ -174,8 +174,8 @@ ApplicationWindow { id: __pageStack anchors { fill: parent - //HACK: workaround a bug in android keyboard management - bottomMargin: Qt.platform.os == "android" ? 0 : Qt.inputMethod.keyboardRectangle.height + //HACK: workaround a bug in android iOS keyboard management + bottomMargin: ((Qt.platform.os == "android" || Qt.platform.os == "ios") && !Qt.inputMethod.visible) ? 0 : Qt.inputMethod.keyboardRectangle.height } focus: true Keys.onReleased: { -- 2.6.4 (Apple Git-63)
>From aac36c6e2ce3b09e81ae3d6f60d1fcb5cc1bfb77 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Fri, 1 Apr 2016 20:59:37 -0500 Subject: [PATCH 2/2] Trigger OverlaySheet open() and close() by PropertyChanges This way a state change can trigger the animation to show or hide an OverlaySheet. Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/qml/OverlaySheet.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/qml/OverlaySheet.qml b/src/qml/OverlaySheet.qml index 285b24c..232156a 100644 --- a/src/qml/OverlaySheet.qml +++ b/src/qml/OverlaySheet.qml @@ -37,6 +37,13 @@ Item { visible: false /** + * show: bool + * if set to true, open the OverlaySheet + * this allows to trigger the open from a state change + */ + property bool show: false + + /** * opened: bool * If true the sheet is open showing the contents of the OverlaySheet * component. @@ -78,6 +85,12 @@ Item { closeAnimation.running = true; } + onShowChanged: { + if (show && !opened) + open() + else if (!show && opened) + close() + } property Item background: Item { anchors.fill: parent Rectangle { -- 2.6.4 (Apple Git-63)
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel