Skip to content

Add and demo ConnectionSettings and ContinueButton components#101

Merged
hebasto merged 4 commits into
bitcoin-core:mainfrom
jarolrod:connection-settings
Jan 10, 2022
Merged

Add and demo ConnectionSettings and ContinueButton components#101
hebasto merged 4 commits into
bitcoin-core:mainfrom
jarolrod:connection-settings

Conversation

@jarolrod
Copy link
Copy Markdown
Contributor

@jarolrod jarolrod commented Jan 4, 2022

This introduces the ConnectionSettings component, which represents the detailed connections settings page as designed in the main design file. 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:
Screen Shot 2022-01-03 at 9 28 59 PM

Windows
macOS
Android

@jarolrod
Copy link
Copy Markdown
Contributor Author

jarolrod commented Jan 5, 2022

updated from 8f801eb -> 533993f

Changes:

  • rebased over master
  • updated include versions
  • Settings.qml
    • Setting control base type changed from Item to control
    • removed instances of height: sourceComponent.height
    • removed setting implicitHeight
  • dropped change on the stubs size as it's not relevant to the goal of this PR

@jarolrod jarolrod force-pushed the connection-settings branch from 533993f to 5d10e90 Compare January 5, 2022 19:29
@jarolrod
Copy link
Copy Markdown
Contributor Author

jarolrod commented Jan 5, 2022

updated from 533993f -> 5d10e90

changes:

@jarolrod jarolrod force-pushed the connection-settings branch from 5d10e90 to e12442b Compare January 5, 2022 19:46
@jarolrod
Copy link
Copy Markdown
Contributor Author

jarolrod commented Jan 5, 2022

updated from 5d10e90 -> e12442b

Changes:

  • in settings.qml bind visible to active

Comment thread src/qml/pages/stub.qml Outdated
ConnectionOptions {
Layout.preferredWidth: 400
focus: true
StackLayout {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI stack doesn't support animation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a blocker for this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it's just used here for simplicity of the demo. #106 uses an uninteractive SwipeView which has the animations we want.

Copy link
Copy Markdown
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e12442b, tested on Linux Mint 20.3 (with depends).

As this PR has no conflicts with #110, going to merge it.

@hebasto
Copy link
Copy Markdown
Member

hebasto commented Jan 9, 2022

Could the last commit (a demo) be dropped from this PR, to avoid conflicts with #110?

@jarolrod jarolrod force-pushed the connection-settings branch from e12442b to c026a3e Compare January 10, 2022 16:44
@jarolrod
Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-ACK c026a3e

@hebasto hebasto merged commit 574a701 into bitcoin-core:main Jan 10, 2022
spacing: 20
Setting {
Layout.fillWidth: true
header: "Use cellular data"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget about translations? Use qsTr()?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #111

property bool last: false
property string header
property string description
contentItem: GridLayout {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really a grid.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be a more appropriate Layout for it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A ColumnLayout with a nested RowLayout

Control {
id: root
property bool last: false
property string header
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want these required?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #111


Control {
id: root
property bool last: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #111

implicitWidth: 45
implicitHeight: 28
x: root.leftPadding
y: parent.height / 2 - height / 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Math.round((parent.height - height) / 2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #111

hebasto added a commit that referenced this pull request Jan 13, 2022
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
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 7, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 8, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
hebasto pushed a commit to hebasto/gui-qml that referenced this pull request Jun 9, 2025
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
…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">

  [![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/101)
  [![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/101)
  [![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/101)

ACKs for top commit:
  hebasto:
    re-ACK 0d552e2

Tree-SHA512: c63902a1dedce3647eb4a1b36ff8cfd738aa5dd62781413908157d3cff67bf51b224b5c078ec83e69d76c6d9642da34a8f096e4f446cea6ada98ecd202e0be1e
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
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
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
…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">

  [![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/101)
  [![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/101)
  [![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/101)

ACKs for top commit:
  hebasto:
    re-ACK 0d552e22907e14702aa9846c98f57a7bae29c24a

Tree-SHA512: c63902a1dedce3647eb4a1b36ff8cfd738aa5dd62781413908157d3cff67bf51b224b5c078ec83e69d76c6d9642da34a8f096e4f446cea6ada98ecd202e0be1e
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants