Add and demo ConnectionSettings and ContinueButton components#101
Conversation
8f801eb to
533993f
Compare
|
updated from 8f801eb -> 533993f Changes:
|
533993f to
5d10e90
Compare
|
updated from 533993f -> 5d10e90 changes:
|
5d10e90 to
e12442b
Compare
| ConnectionOptions { | ||
| Layout.preferredWidth: 400 | ||
| focus: true | ||
| StackLayout { |
There was a problem hiding this comment.
FYI stack doesn't support animation.
There was a problem hiding this comment.
yeah it's just used here for simplicity of the demo. #106 uses an uninteractive SwipeView which has the animations we want.
|
Could the last commit (a demo) be dropped from this PR, to avoid conflicts with #110? |
e12442b to
c026a3e
Compare
|
updated from e12442b -> c026a3e Changes: drop last commit to avoid conflict with #110. The demo of this PR has been moved to: connection-settings-demo |
| spacing: 20 | ||
| Setting { | ||
| Layout.fillWidth: true | ||
| header: "Use cellular data" |
There was a problem hiding this comment.
Don't forget about translations? Use qsTr()?
| property bool last: false | ||
| property string header | ||
| property string description | ||
| contentItem: GridLayout { |
There was a problem hiding this comment.
What would be a more appropriate Layout for it?
There was a problem hiding this comment.
A ColumnLayout with a nested RowLayout
| Control { | ||
| id: root | ||
| property bool last: false | ||
| property string header |
|
|
||
| Control { | ||
| id: root | ||
| property bool last: false |
There was a problem hiding this comment.
This could be automatic, here's a simple approach that doesn't take into account if visible property:
property bool last: parent && root == parent.children[parent.children.length - 1]| implicitWidth: 45 | ||
| implicitHeight: 28 | ||
| x: root.leftPadding | ||
| y: parent.height / 2 - height / 2 |
There was a problem hiding this comment.
Math.round((parent.height - height) / 2)f5458f2 qml: Make further suggested changes to Settings.qml (Shashwat) a0ba0d7 qml: Replace GridLayout with nested Column Row Layout in Settings.qml (Shashwat) be87ba9 qml: Use Math.round() in OptionSwitch.qml (Shashwat) fe41329 qml: Using qsTr() with strings in ConnectionSettings.qml (Shashwat) Pull request description: - This PR is a follow-up to #101 and addresses suggestions of [this](#101 (comment)) comment. - The changes are split into separate commits so that they can be easier to review, and reason with. ACKs for top commit: promag: Code review ACK f5458f2. Tree-SHA512: f1a421a74fcf61a861720f4a9ad489042964f022db186fce6f9d9013af37f6575a2bef11ea02c4b79eeefdd8e89aab4f2bae86a0d30d0e47b889ce4d595781fc
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
Github-Pull: bitcoin-core#101 Rebased-From: d038898
Github-Pull: bitcoin-core#101 Rebased-From: f41fb20
Github-Pull: bitcoin-core#101 Rebased-From: d7eea93
Github-Pull: bitcoin-core#101 Rebased-From: c026a3e
…ontinueButton components 0d552e2 qml: introduce ConnectionSettings component (jarolrod) 14f59eb qml: introduce Setting control (jarolrod) 6e991fb qml: introduce OptionSwitch control (jarolrod) d44f28f qml: introduce ContinueButton control (jarolrod) Pull request description: This introduces the `ConnectionSettings` component, which represents the [detailed connections settings page](https://www.figma.com/file/GaCoOSNHB2yMB9ThiDtred/Bitcoin-Core-App-Main?node-id=2777%3A67296) as designed in the [main design file](https://www.figma.com/file/GaCoOSNHB2yMB9ThiDtred/Bitcoin-Core-App-Main?node-id=1035%3A1883). It also introduces the controls the component depends on, `Setting` and `OptionSwitch`. Missing is the Text button that is used for settings which require an input value, because the functionality of that component needs to be discussed. The `Setting` control represents an individual setting of the `ConnectionSettings` components, this component uses the `Header` control for its text. `OptionSwitch` represents the toggle button shown in the design. To accomplish a proper demo of this component, this places our forms (ConnectionOptions and ConnectionSettings) into a StackLayout. The `ContinueButton` is introduced to advance/rewind the stack. A `PageIndicator` is added to highlight the functionality of the demo. Additionally, to fix the annoying behavior of the stub currently, this makes the dimensions of the stub page dependent on it's contents width. 😄 **Image of added components:** <img width="529" alt="Screen Shot 2022-01-03 at 9 28 59 PM" src="https://user-images.githubusercontent.com/23396902/148001662-d374d6c7-5335-4406-a4fa-cbb205aa8d86.png"> [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/101) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/101) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/101) ACKs for top commit: hebasto: re-ACK 0d552e2 Tree-SHA512: c63902a1dedce3647eb4a1b36ff8cfd738aa5dd62781413908157d3cff67bf51b224b5c078ec83e69d76c6d9642da34a8f096e4f446cea6ada98ecd202e0be1e
7113e38 qml: Make further suggested changes to Settings.qml (Shashwat) a9d6910 qml: Replace GridLayout with nested Column Row Layout in Settings.qml (Shashwat) ad8d06c qml: Use Math.round() in OptionSwitch.qml (Shashwat) 1cef5ce qml: Using qsTr() with strings in ConnectionSettings.qml (Shashwat) Pull request description: - This PR is a follow-up to #101 and addresses suggestions of [this](bitcoin-core/gui-qml#101 (comment)) comment. - The changes are split into separate commits so that they can be easier to review, and reason with. ACKs for top commit: promag: Code review ACK 7113e38. Tree-SHA512: f1a421a74fcf61a861720f4a9ad489042964f022db186fce6f9d9013af37f6575a2bef11ea02c4b79eeefdd8e89aab4f2bae86a0d30d0e47b889ce4d595781fc
…ontinueButton components 0d552e22907e14702aa9846c98f57a7bae29c24a qml: introduce ConnectionSettings component (jarolrod) 14f59ebedbacf129a175e38e7b472fddd64602ec qml: introduce Setting control (jarolrod) 6e991fb977ae038803ffb179102fc59aad4f34a4 qml: introduce OptionSwitch control (jarolrod) d44f28f99c2883495e4988d8ab773a6f2aa830a7 qml: introduce ContinueButton control (jarolrod) Pull request description: This introduces the `ConnectionSettings` component, which represents the [detailed connections settings page](https://www.figma.com/file/GaCoOSNHB2yMB9ThiDtred/Bitcoin-Core-App-Main?node-id=2777%3A67296) as designed in the [main design file](https://www.figma.com/file/GaCoOSNHB2yMB9ThiDtred/Bitcoin-Core-App-Main?node-id=1035%3A1883). It also introduces the controls the component depends on, `Setting` and `OptionSwitch`. Missing is the Text button that is used for settings which require an input value, because the functionality of that component needs to be discussed. The `Setting` control represents an individual setting of the `ConnectionSettings` components, this component uses the `Header` control for its text. `OptionSwitch` represents the toggle button shown in the design. To accomplish a proper demo of this component, this places our forms (ConnectionOptions and ConnectionSettings) into a StackLayout. The `ContinueButton` is introduced to advance/rewind the stack. A `PageIndicator` is added to highlight the functionality of the demo. Additionally, to fix the annoying behavior of the stub currently, this makes the dimensions of the stub page dependent on it's contents width. 😄 **Image of added components:** <img width="529" alt="Screen Shot 2022-01-03 at 9 28 59 PM" src="https://user-images.githubusercontent.com/23396902/148001662-d374d6c7-5335-4406-a4fa-cbb205aa8d86.png"> [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/101) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/101) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/101) ACKs for top commit: hebasto: re-ACK 0d552e22907e14702aa9846c98f57a7bae29c24a Tree-SHA512: c63902a1dedce3647eb4a1b36ff8cfd738aa5dd62781413908157d3cff67bf51b224b5c078ec83e69d76c6d9642da34a8f096e4f446cea6ada98ecd202e0be1e
7113e389b635b45d1e99ada85795ee5922d9ca62 qml: Make further suggested changes to Settings.qml (Shashwat) a9d6910fbc3a8517ceb3140a0d479338ff65d2ab qml: Replace GridLayout with nested Column Row Layout in Settings.qml (Shashwat) ad8d06cce00b8a75c01c4f1eda89b888f11ad1a5 qml: Use Math.round() in OptionSwitch.qml (Shashwat) 1cef5ce8cc1c04d16dec277a21e13ae11b30631a qml: Using qsTr() with strings in ConnectionSettings.qml (Shashwat) Pull request description: - This PR is a follow-up to #101 and addresses suggestions of [this](bitcoin-core/gui-qml#101 (comment)) comment. - The changes are split into separate commits so that they can be easier to review, and reason with. ACKs for top commit: promag: Code review ACK 7113e389b635b45d1e99ada85795ee5922d9ca62. Tree-SHA512: f1a421a74fcf61a861720f4a9ad489042964f022db186fce6f9d9013af37f6575a2bef11ea02c4b79eeefdd8e89aab4f2bae86a0d30d0e47b889ce4d595781fc
This introduces the
ConnectionSettingscomponent, which represents the detailed connections settings page as designed in the main design file. It also introduces the controls the component depends on,SettingandOptionSwitch. Missing is the Text button that is used for settings which require an input value, because the functionality of that component needs to be discussed.The
Settingcontrol represents an individual setting of theConnectionSettingscomponents, this component uses theHeadercontrol for its text.OptionSwitchrepresents the toggle button shown in the design.To accomplish a proper demo of this component, this places our forms (ConnectionOptions and ConnectionSettings) into a StackLayout. The
ContinueButtonis introduced to advance/rewind the stack. APageIndicatoris added to highlight the functionality of the demo.Additionally, to fix the annoying behavior of the stub currently, this makes the dimensions of the stub page dependent on it's contents width. 😄
Image of added components:
