Introducing Reusable Setting Views#197
Conversation
johnny9
left a comment
There was a problem hiding this comment.
ACK 3e62f27
Much clearer definition of the Settings pages and much better file naming when looking for a page with specific context. One minor quirk with the naming of the page and the selection component that can be thought about and addressed later if a solution is found.
Views render as expected and no qml warnings when run.
| detailActive: true | ||
| detailItem: ColumnLayout { | ||
| spacing: 0 | ||
| StorageSettings { |
There was a problem hiding this comment.
The naming here ends up being a bit funny as its nearly identical to the parent component's name. Maybe append to the component name something that signifies that it is just the selection piece or use "import as" when bringing in the component.
There was a problem hiding this comment.
Just noticed the naming here are the same words in reversed order :D, can anyone suggest better naming here?
@GBKS: SettingsStorage.qml represents the actualy page view for the Settings that are related to Storage. And StorageSettings is a component we place inside of SettingsStorage.qml that represents the table of advanced settings which are related to Storage.
There was a problem hiding this comment.
since this component is already under a "settings" folder. Maybe StorageSettingsPage is better name for the component and then something equivalent for the other components since it is a "Page" that holds the "StorageSettings"
| Loader { | ||
| source:"onboarding01a.qml" | ||
| InformationPage { | ||
| Layout.fillWidth: true |
There was a problem hiding this comment.
SwipeViews don't handle Layout properties. Think this can be removed.
There was a problem hiding this comment.
thanks for spotting these, it's a bad habit of mine to place this until the view is working correctly. Since you've already opened a PR to address them, i've left this as is.
| background: null | ||
| clip: true | ||
| InformationPage { | ||
| Layout.fillWidth: true |
There was a problem hiding this comment.
This Layout property can be removed
| background: null | ||
| clip: true | ||
| InformationPage { | ||
| Layout.fillWidth: true |
| Page { | ||
| background: null | ||
| InformationPage { | ||
| Layout.fillWidth: true |
| Loader { | ||
| source:"onboarding05a.qml" | ||
| InformationPage { | ||
| Layout.fillWidth: true |
| Loader { | ||
| source:"onboarding06a.qml" | ||
| InformationPage { | ||
| Layout.fillWidth: true |
| import "../../components" | ||
|
|
||
| InformationPage { | ||
| Layout.fillWidth: true |
|
|
||
| InformationPage { | ||
| background: null | ||
| Layout.fillWidth: true |
| import "../../components" | ||
|
|
||
| InformationPage { | ||
| Layout.fillWidth: true |
| import "../../components" | ||
|
|
||
| InformationPage { | ||
| Layout.fillWidth: true |
This extracts out the navbar element defintions from the settings page itself, and moves it to where the page is instantiated. This allows the settings views to be reused anywhere else we want to use them, and are now no longer limited to being used within the onboarding wizard.
3e62f27 to
30db8cc
Compare
Github-Pull: bitcoin-core#197 Rebased-From: 5f11241
Github-Pull: bitcoin-core#197 Rebased-From: 86170be
This extracts out the navbar element defintions from the settings page itself, and moves it to where the page is instantiated. This allows the settings views to be reused anywhere else we want to use them, and are now no longer limited to being used within the onboarding wizard. Github-Pull: bitcoin-core#197 Rebased-From: 30db8cc
Github-Pull: bitcoin-core#197 Rebased-From: 5f11241
Github-Pull: bitcoin-core#197 Rebased-From: 86170be
This extracts out the navbar element defintions from the settings page itself, and moves it to where the page is instantiated. This allows the settings views to be reused anywhere else we want to use them, and are now no longer limited to being used within the onboarding wizard. Github-Pull: bitcoin-core#197 Rebased-From: 30db8cc
Github-Pull: bitcoin-core#197 Rebased-From: 5f11241
Github-Pull: bitcoin-core#197 Rebased-From: 86170be
This extracts out the navbar element defintions from the settings page itself, and moves it to where the page is instantiated. This allows the settings views to be reused anywhere else we want to use them, and are now no longer limited to being used within the onboarding wizard. Github-Pull: bitcoin-core#197 Rebased-From: 30db8cc
This makes the settings views independent from the onboarding views and refactors the definition of the settings views so that these now independent settings view pages can be reused anywhere and as many times as we need to; they are not delegated to only be used within the onboarding wizard.
Desktop
Master
PR