Extend settings component#143
Merged
Merged
Conversation
This was referenced Aug 3, 2022
shaavan
reviewed
Aug 3, 2022
Contributor
There was a problem hiding this comment.
Strong Concept ACK
- I agree with this change for all the reasons explained in the description. Especially because this helps remove redundant code while making the Settings.qml scalable.
- The code changes are complete and exhaustive and completely map the functionality with the master.
- While testing this PR on my laptop (Ubuntu 22.04, Qt version 5.15.3), I observed some key differences from the master.
Testing differences:
- Hovering over links no more shows the edit cursor.
Screenshot:
| Master | PR |
|---|---|
![]() |
![]() |
- The optionswitch is misaligned from the divider line.
Screenshot:
| Master | PR |
|---|---|
![]() |
![]() |
There is a few more change that needs to be fixed in master as well, which I would suggest adding to this PR. However, these can be taken up in separate PR as well.
- The button for the Developers option on the About Options page is not right-aligned properly. (Fixed by PR#144)
Edit: #144 fixes the misaligned Developers option arrow.
ac4dbd2 to
0935349
Compare
Contributor
Author
0935349 to
3b53ae6
Compare
3b53ae6 to
69d0778
Compare
This was referenced Aug 10, 2022
hebasto
added a commit
that referenced
this pull request
Aug 11, 2022
aadee41 qml: introduce ExternalLink control (jarolrod) Pull request description: Control to handle storing and opening of external links. Can be just text or icon, or combination. To be tested with #143 [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/141) ACKs for top commit: hebasto: ACK aadee41, tested on Ubuntu 22.04. Tree-SHA512: 01a1c456607742ac0ec4fe4a575631a9ab6cc6dc263c773ad2673b69534ce0463fcd8915b6fd9f11c32c8e9315fc204e55fec545dfcaddeb6bd337f2a7708ced
Member
69d0778 to
d4db4d1
Compare
hebasto
approved these changes
Aug 11, 2022
hebasto
added a commit
that referenced
this pull request
Aug 11, 2022
97288e2 qml: introduce basic ValueInput control (jarolrod) Pull request description: A basic user input text field. To be tested with #143 [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/142) ACKs for top commit: hebasto: ACK 97288e2 Tree-SHA512: b4c729f8840c29467301e07772600437cf9e4031aea8d714ca1b6d7950e921eab942757e82af2333c674b4ae389d28ed29e052a30e75488df78c68b9ee8a3ff7
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation.
This is no longer needed.
d4db4d1 to
ee82e9c
Compare
Contributor
Author
hebasto
reviewed
May 11, 2023
| header: qsTr("Version") | ||
| actionItem: ExternalLink { | ||
| description: qsTr("v22.99.0-1e7564eca8a6 >") | ||
| link: "https://bitcoin.org/en/download" |
Member
There was a problem hiding this comment.
Please remove this link or update it to https://bitcoincore.org/
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 7, 2025
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation. Github-Pull: bitcoin-core#143 Rebased-From: 40d48e7
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 7, 2025
This is no longer needed. Github-Pull: bitcoin-core#143 Rebased-From: ee82e9c
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 8, 2025
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation. Github-Pull: bitcoin-core#143 Rebased-From: 40d48e7
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 8, 2025
This is no longer needed. Github-Pull: bitcoin-core#143 Rebased-From: ee82e9c
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 8, 2025
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation. Github-Pull: bitcoin-core#143 Rebased-From: 40d48e7
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 8, 2025
This is no longer needed. Github-Pull: bitcoin-core#143 Rebased-From: ee82e9c
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 9, 2025
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation. Github-Pull: bitcoin-core#143 Rebased-From: 40d48e7
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 9, 2025
This is no longer needed. Github-Pull: bitcoin-core#143 Rebased-From: ee82e9c
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 9, 2025
This extends the usability of the settings component so that it is able to load any action item. This means that this component can be used for all settings regardless of what action is meant to be on the right side. This prevents the need for endless mutations on the settings component to accomodate for different use-cases; the information component being one such mutation. Github-Pull: bitcoin-core#143 Rebased-From: 40d48e7
hebasto
pushed a commit
to hebasto/gui-qml
that referenced
this pull request
Jun 9, 2025
This is no longer needed. Github-Pull: bitcoin-core#143 Rebased-From: ee82e9c
johnny9
pushed a commit
to johnny9/bitcoin-core-app
that referenced
this pull request
Jul 4, 2025
ad89b4b qml: remove information qml (jarolrod) fdb17f4 qml: allow the settings component to load a dynamic action item. (jarolrod) Pull request description: bitcoin-core/gui-qml#124 Introduced information.qml which is a mutation of `Setting.qml` but introduces an additional two loaders and respective properties to handle the scenarios where a setting doesn't use an option switch and needs to instead display a link, display an image, or take input. The issue, despite large amounts of duplicate code is that, following this design pattern, we will be introducing a new mutation of `Settings.qml` everytime we have a scenario when there should be something aside from an option switch. Instead of endless mutations, `Settings.qml` can just be made extensible by simply introducing a loader which gives it an `actionItem`. an `actionItem` is the interact-able element of this setting; that could be an option switch, a url, a text input box, or something completely new. An example of something new, see the current simplification of the `AboutOptions.qml` developer settings button: ```diff - RowLayout { - Header { - Layout.fillWidth: true - center: false - header: qsTr("Developer options") - headerSize: 18 - description: qsTr("Only use these if you have development experience") - descriptionSize: 15 - descriptionMargin: 10 - wrap: false - } - Loader { - Layout.fillWidth: true - Layout.preferredWidth: 0 - Layout.alignment: Qt.AlignRight - Layout.rightMargin: 5 - active: true - visible: active - sourceComponent: TextButton { - text: ">" - bold: false - rightalign: true - onClicked: { - introductions.incrementCurrentIndex() - swipeView.inSubPage = true - } + Setting { + Layout.fillWidth: true + header: qsTr("Developer options") + description: qsTr("Only use these if you have development experience") + actionItem: TextButton { + text: ">" + bold: false + rightalign: true + onClicked: { + introductions.incrementCurrentIndex() + swipeView.inSubPage = true } ``` [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/143) ACKs for top commit: hebasto: re-ACK ad89b4b Tree-SHA512: 0fa95884d25b56ed6d6eaf49f554de502b44b3fe4dc1db17967c1b5fe2b6aa76e3188e00ad00173335a973c3b48e5e4947dc170becbe4a42cdd1417be0fd5c02
johnny9
pushed a commit
to johnny9/gui-qml
that referenced
this pull request
Jul 10, 2025
5cbad13 qml: introduce ExternalLink control (jarolrod) Pull request description: Control to handle storing and opening of external links. Can be just text or icon, or combination. To be tested with bitcoin-core#143 [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/141) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/141) ACKs for top commit: hebasto: ACK 5cbad13, tested on Ubuntu 22.04. Tree-SHA512: 01a1c456607742ac0ec4fe4a575631a9ab6cc6dc263c773ad2673b69534ce0463fcd8915b6fd9f11c32c8e9315fc204e55fec545dfcaddeb6bd337f2a7708ced
johnny9
pushed a commit
to johnny9/gui-qml
that referenced
this pull request
Jul 10, 2025
db34c61 qml: introduce basic ValueInput control (jarolrod) Pull request description: A basic user input text field. To be tested with bitcoin-core#143 [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/142) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/142) ACKs for top commit: hebasto: ACK db34c61 Tree-SHA512: b4c729f8840c29467301e07772600437cf9e4031aea8d714ca1b6d7950e921eab942757e82af2333c674b4ae389d28ed29e052a30e75488df78c68b9ee8a3ff7
tx-signer450
added a commit
to tx-signer450/gui-qml
that referenced
this pull request
Oct 20, 2025
ad89b4b6e63fee301283f4245bfbcfb4de07c22b qml: remove information qml (jarolrod) fdb17f4802f785efe39f83b68431cef574d0a1c3 qml: allow the settings component to load a dynamic action item. (jarolrod) Pull request description: bitcoin-core/gui-qml#124 Introduced information.qml which is a mutation of `Setting.qml` but introduces an additional two loaders and respective properties to handle the scenarios where a setting doesn't use an option switch and needs to instead display a link, display an image, or take input. The issue, despite large amounts of duplicate code is that, following this design pattern, we will be introducing a new mutation of `Settings.qml` everytime we have a scenario when there should be something aside from an option switch. Instead of endless mutations, `Settings.qml` can just be made extensible by simply introducing a loader which gives it an `actionItem`. an `actionItem` is the interact-able element of this setting; that could be an option switch, a url, a text input box, or something completely new. An example of something new, see the current simplification of the `AboutOptions.qml` developer settings button: ```diff - RowLayout { - Header { - Layout.fillWidth: true - center: false - header: qsTr("Developer options") - headerSize: 18 - description: qsTr("Only use these if you have development experience") - descriptionSize: 15 - descriptionMargin: 10 - wrap: false - } - Loader { - Layout.fillWidth: true - Layout.preferredWidth: 0 - Layout.alignment: Qt.AlignRight - Layout.rightMargin: 5 - active: true - visible: active - sourceComponent: TextButton { - text: ">" - bold: false - rightalign: true - onClicked: { - introductions.incrementCurrentIndex() - swipeView.inSubPage = true - } + Setting { + Layout.fillWidth: true + header: qsTr("Developer options") + description: qsTr("Only use these if you have development experience") + actionItem: TextButton { + text: ">" + bold: false + rightalign: true + onClicked: { + introductions.incrementCurrentIndex() + swipeView.inSubPage = true } ``` [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/143) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/143) ACKs for top commit: hebasto: re-ACK ad89b4b6e63fee301283f4245bfbcfb4de07c22b Tree-SHA512: 0fa95884d25b56ed6d6eaf49f554de502b44b3fe4dc1db17967c1b5fe2b6aa76e3188e00ad00173335a973c3b48e5e4947dc170becbe4a42cdd1417be0fd5c02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





#124 Introduced information.qml which is a mutation of
Setting.qmlbut introduces an additional two loaders and respective properties to handle the scenarios where a setting doesn't use an option switch and needs to instead display a link, display an image, or take input.The issue, despite large amounts of duplicate code is that, following this design pattern, we will be introducing a new mutation of
Settings.qmleverytime we have a scenario when there should be something aside from an option switch.Instead of endless mutations,
Settings.qmlcan just be made extensible by simply introducing a loader which gives it anactionItem. anactionItemis the interact-able element of this setting; that could be an option switch, a url, a text input box, or something completely new.An example of something new, see the current simplification of the
AboutOptions.qmldeveloper settings button: