Introduce Wizard control #106

Manually merged
jarolrod merged 1 commit from onboarding-wizard into main 2022-05-28 18:55:10 +00:00 AGit
jarolrod commented 2022-01-05 15:43:43 +00:00 (Migrated from github.com)

Introduces the wizard control which will hold all of the onboarding views. A convenient demo can be found here: onboarding-wizard-demo

The demo shows the following views:
onboarding-flow

Windows
macOS
Android

Introduces the wizard control which will hold all of the onboarding views. A convenient demo can be found here: [onboarding-wizard-demo](https://github.com/jarolrod/gui-qml/tree/onboarding-wizard-demo) The demo shows the following views: ![onboarding-flow](https://user-images.githubusercontent.com/23396902/148246185-5e2a3b7b-9960-43c3-9f34-850b9cdf8457.png) [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/106) [![macOS](https://img.shields.io/badge/OS-macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/106) [![Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/106)
jarolrod commented 2022-01-06 03:15:45 +00:00 (Migrated from github.com)

updated from 35fad87 -> 3ea53bd

changes:

  • rebased over master
  • Update imports
  • Various tidy ups
  • Refactor finished() signal to property finished, check onFinishedChanged to see if we should push the node component
updated from 35fad87 -> 3ea53bd changes: - rebased over master - Update imports - Various tidy ups - Refactor finished() signal to property finished, check `onFinishedChanged` to see if we should push the node component
hebasto commented 2022-01-06 10:18:23 +00:00 (Migrated from github.com)

#103 has been merged, please rebase.

#103 has been merged, please rebase.
jarolrod commented 2022-01-06 15:53:17 +00:00 (Migrated from github.com)

updated from 3ea53bd -> b93bb21

Changes:

  • rebased
  • included progress indicator in demo
updated from 3ea53bd -> b93bb21 Changes: - rebased - included progress indicator in demo
GBKS commented 2022-01-10 13:33:22 +00:00 (Migrated from github.com)

This is great. Do you want feedback on this at the moment?

This is great. Do you want feedback on this at the moment?
jarolrod commented 2022-01-11 04:56:49 +00:00 (Migrated from github.com)

updated from b93bb21 -> caf2ba2

Changes:

  • rebased over master to drop dependencies on #101 and #103
  • rework demo to take into account that the demo's from #101 and #102 have been removed from their respective branches.
updated from b93bb21 -> caf2ba2 Changes: - rebased over master to drop dependencies on #101 and #103 - rework demo to take into account that the demo's from #101 and #102 have been removed from their respective branches.
promag (Migrated from github.com) reviewed 2022-01-13 16:08:48 +00:00
promag (Migrated from github.com) commented 2022-01-13 14:57:13 +00:00

4459728e3054e214628c52d26fdfc92b66a942fc

This is too abstract.

4459728e3054e214628c52d26fdfc92b66a942fc This is too abstract.
promag (Migrated from github.com) commented 2022-01-13 14:56:12 +00:00

4459728e3054e214628c52d26fdfc92b66a942fc

Math.round()?

4459728e3054e214628c52d26fdfc92b66a942fc `Math.round()`?
promag (Migrated from github.com) commented 2022-01-13 15:40:13 +00:00

2d84aa6f0d73211e4274399cc27b81c74b75dd5a

add translation. The arrow should be an icon?

2d84aa6f0d73211e4274399cc27b81c74b75dd5a add translation. The arrow should be an icon?
promag (Migrated from github.com) commented 2022-01-13 15:34:13 +00:00

nit, sounds confusing since root is the "Wizard". I'd rename it to swipeView.

nit, sounds confusing since `root` is the "Wizard". I'd rename it to `swipeView`.
promag (Migrated from github.com) commented 2022-01-13 15:39:33 +00:00

2d84aa6f0d73211e4274399cc27b81c74b75dd5a

nit, bad indentation.

FWIW I don't recommend this approach of loading. It sounds very simple but has some drawbacks:

  • say page X is faulty, then those errors will only show when you reach X
  • the component instance will use the loader context when resolving property values, this prevents you from using required properties on each page
  • You have to stick to the filename convention, and later you have to rename some in order to add a new page in the middle

Instead, I suggest using loader sourceComponent property.

However, I think we can avoid the Loader, like this:

// Wizard.qml
Page {
    default property alias pages: swipeView.data
   
    contentItem: SwipeView {
    }
}

Then to implement some wizard:

Wizard {
    Page1 {
        someRequiredProperty: someWildExpression
    }
    Page2 {
    }
}

Feel free to discuss or ask for help in slack.

2d84aa6f0d73211e4274399cc27b81c74b75dd5a nit, bad indentation. FWIW I don't recommend this approach of loading. It sounds very simple but has some drawbacks: - say page X is faulty, then those errors will only show when you reach X - the component instance will use the loader context when resolving property values, this prevents you from using required properties on each page - You have to stick to the filename convention, and later you have to rename some in order to add a new page in the middle Instead, I suggest using loader `sourceComponent` property. However, I think we can avoid the `Loader`, like this: ```qml // Wizard.qml Page { default property alias pages: swipeView.data contentItem: SwipeView { } } ``` Then to implement some wizard: ```qml Wizard { Page1 { someRequiredProperty: someWildExpression } Page2 { } } ``` Feel free to discuss or ask for help in slack.
promag (Migrated from github.com) commented 2022-01-13 15:50:11 +00:00

2d84aa6f0d73211e4274399cc27b81c74b75dd5a

Can be removed.

2d84aa6f0d73211e4274399cc27b81c74b75dd5a Can be removed.
promag (Migrated from github.com) commented 2022-01-13 15:57:05 +00:00

2d84aa6f0d73211e4274399cc27b81c74b75dd5a

Lets avoid anchors and fixed sizes. In this case I suggest:

footer: Page {
    background: Rectangle {
        color: "black"
    }
    contentItem: RowLayout {
        Indicator {
            Layout.alignment: Qt.AlignCenter
            count: swipeView.count
            currentIndex: wizard.currentIndex
        }
    }
}
2d84aa6f0d73211e4274399cc27b81c74b75dd5a Lets avoid anchors and fixed sizes. In this case I suggest: ```qml footer: Page { background: Rectangle { color: "black" } contentItem: RowLayout { Indicator { Layout.alignment: Qt.AlignCenter count: swipeView.count currentIndex: wizard.currentIndex } } } ```
jarolrod commented 2022-05-25 03:35:12 +00:00 (Migrated from github.com)

updated from caf2ba2 to 50b9573

changes:

  • incorporate most of @promag suggestions
  • split out views from this change, to be opened in a future PR
updated from caf2ba2 to 50b9573 changes: - incorporate most of @promag suggestions - split out views from this change, to be opened in a future PR
jarolrod (Migrated from github.com) reviewed 2022-05-25 03:36:06 +00:00
jarolrod (Migrated from github.com) commented 2022-05-25 03:36:06 +00:00

will leave this as a follow-up for now because, with this suggestion, the file in which we implement all the views will be huge. We probably need a template for each page of the onboarding views in order to keep it tight

will leave this as a follow-up for now because, with this suggestion, the file in which we implement all the views will be huge. We probably need a template for each page of the onboarding views in order to keep it tight
jarolrod (Migrated from github.com) reviewed 2022-05-25 03:36:48 +00:00
jarolrod (Migrated from github.com) commented 2022-05-25 03:36:48 +00:00

will keep for a follow-up until I plot out all the necessary types of buttons, and determine if this should be a custom component or not

will keep for a follow-up until I plot out all the necessary types of buttons, and determine if this should be a custom component or not
hebasto commented 2022-05-28 09:55:42 +00:00 (Migrated from github.com)

This PR needs to be rebased.

This PR needs to be rebased.
jarolrod commented 2022-05-28 17:20:20 +00:00 (Migrated from github.com)

Updated from 50b9573 to dffb73e, also updated the onboarding-wizard-demo for convenient testing

Changes:

  • rebased over master
Updated from 50b9573 to dffb73e, also updated the [onboarding-wizard-demo](https://github.com/jarolrod/gui-qml/tree/onboarding-wizard-demo) for convenient testing Changes: - rebased over master
shaavan commented 2022-05-28 18:21:23 +00:00 (Migrated from github.com)

Amazing work, @jarolrod!
I shall be posting my review soon.

For now, I would like to bring attention to the problem I noticed, which needs to be addressed.

I experimented with different window sizes, and I noticed that the text from the onboarding 03a page is overflowing onto the 03b page for windows with small vertical height.

onboarding 03b page
Screenshot from 2022-05-28 23-38-31

I thought its best to bring it to the attention before moving forward with reviewing.

Amazing work, @jarolrod! I shall be posting my review soon. For now, I would like to bring attention to the problem I noticed, which needs to be addressed. I experimented with different window sizes, and I noticed that the text from the _onboarding 03a_ page is overflowing onto the _03b_ page for windows with small vertical height. **onboarding 03b page** ![Screenshot from 2022-05-28 23-38-31](https://user-images.githubusercontent.com/85434418/170837869-3fd892e0-5feb-41d3-af46-312c3b59e174.png) I thought its best to bring it to the attention before moving forward with reviewing.
jarolrod commented 2022-05-28 18:25:00 +00:00 (Migrated from github.com)

@shaavan that's just the demo, the window sizes aren't complete on the rudimentary demo and those pages aren't perfect. Just meant to show that the wizard control works and works for all the use cases required, like subpages.

@shaavan that's just the demo, the window sizes aren't complete on the rudimentary demo and those pages aren't perfect. Just meant to show that the wizard control works and works for all the use cases required, like subpages.
shaavan commented 2022-05-28 18:43:31 +00:00 (Migrated from github.com)

Got it! I reckoned that this might be the case, as the pages are in the prototype phase. But I still thought to bring it to the notice, just in case this was an unintended issue.

Got it! I reckoned that this might be the case, as the pages are in the prototype phase. But I still thought to bring it to the notice, just in case this was an unintended issue.
hebasto (Migrated from github.com) approved these changes 2022-05-28 18:52:19 +00:00
hebasto (Migrated from github.com) left a comment
ACK dffb73e6824a0d0dac378208a5b27889fc225b14
Sign in to join this conversation.
No description provided.