Introduce Signal Based Navigation Model to have Self-Contained Pages #427

Manually merged
jarolrod merged 5 commits from contain-pages into main 2024-10-28 21:16:49 +00:00 AGit
jarolrod commented 2024-10-25 06:29:04 +00:00 (Migrated from github.com)

Here we introduce a Signal Based navigation model, so that we can have self-contained pages. Self-contained pages include everything they need where they are declared, and do not have more than one definition. This makes pages modular, easier to reason about, but also easier to maintain by eliminating dependencies on hard-coded IDs, direct calls to parent views, and interlinked properties between pages.

When we want to reason about PageA.qml, we only have to look in there and the child components it uses, and not have to use a search function to ensure we have the entire scope of PageA.qml.

To Achieve this, this PR implements the following main ideas:

  1. Ensure that pages are not hardcoding and reaching into an outside view.
  2. Ensure we don't alias down any components into pages, and instead have pages define all their components, but react to state events
  3. Ensure we don't have interlinked properties between pages
  4. Move navigation and page linking logic from the pages themselves and into the declaration of the view itself.

Additionally, while here we structure the CreateWallet flow into a Wizard.

Follow-Ups:

Consider moving onboarding and walletName into more appropriate backend objects.

Build Artifacts

Here we introduce a Signal Based navigation model, so that we can have self-contained pages. Self-contained pages include everything they need where they are declared, and do not have more than one definition. This makes pages modular, easier to reason about, but also easier to maintain by eliminating dependencies on hard-coded IDs, direct calls to parent views, and interlinked properties between pages. When we want to reason about `PageA.qml`, we only have to look in there and the child components it uses, and not have to use a search function to ensure we have the entire scope of `PageA.qml`. To Achieve this, this PR implements the following main ideas: 1. Ensure that pages are not hardcoding and reaching into an outside view. 2. Ensure we don't alias down any components into pages, and instead have pages define all their components, but react to state events 3. Ensure we don't have interlinked properties between pages 4. Move navigation and page linking logic from the pages themselves and into the declaration of the view itself. Additionally, while here we structure the CreateWallet flow into a Wizard. **Follow-Ups:** Consider moving onboarding and walletName into more appropriate backend objects. [![Build Artifacts](https://img.shields.io/badge/Build%20Artifacts-green )]()
MarnixCroes (Migrated from github.com) reviewed 2024-10-25 18:59:27 +00:00
MarnixCroes (Migrated from github.com) left a comment

cACK
I went through all the pages, including onboarding and it work ok.

related lint failure should be fixable

cACK I went through all the pages, including onboarding and it work ok. related lint failure should be fixable
MarnixCroes (Migrated from github.com) commented 2024-10-25 18:35:54 +00:00

nit

            states: [
nit ```suggestion states: [ ```
MarnixCroes (Migrated from github.com) commented 2024-10-25 18:36:36 +00:00
            states: [
```suggestion states: [ ```
MarnixCroes (Migrated from github.com) commented 2024-10-25 18:35:00 +00:00

remove white line?

remove white line?
MarnixCroes (Migrated from github.com) commented 2024-10-25 18:36:46 +00:00

same

same
johnny9 commented 2024-10-26 00:54:05 +00:00 (Migrated from github.com)

Concept ACK

No qml errors when going through onboard. Looks like there are just some whitespace issues to fix to make the lint job happy.

Concept ACK No qml errors when going through onboard. Looks like there are just some whitespace issues to fix to make the lint job happy.
jarolrod (Migrated from github.com) reviewed 2024-10-26 23:10:12 +00:00
jarolrod (Migrated from github.com) commented 2024-10-26 23:10:12 +00:00

we should set a style guide actually

we should set a style guide actually
jarolrod commented 2024-10-26 23:11:16 +00:00 (Migrated from github.com)

Updated from from 59aeba2 to 3f94240 compare

Changes: address style feedback and fix white-space lint

Updated from from 59aeba2 to 3f94240 [compare](https://github.com/bitcoin-core/gui-qml/compare/59aeba2f4531f733e1fe2992da687cd1e5f9e96e..3f9424042b7bcaa9a4bafc6a466b3e8d0283325c) Changes: address style feedback and fix white-space lint
johnny9 (Migrated from github.com) approved these changes 2024-10-27 02:02:34 +00:00
johnny9 (Migrated from github.com) left a comment
ACK 3f9424042b7bcaa9a4bafc6a466b3e8d0283325c
MarnixCroes (Migrated from github.com) approved these changes 2024-10-28 07:32:22 +00:00
MarnixCroes (Migrated from github.com) left a comment
ACK 3f9424042b7bcaa9a4bafc6a466b3e8d0283325c
pablomartin4btc (Migrated from github.com) reviewed 2024-11-07 17:48:48 +00:00
pablomartin4btc (Migrated from github.com) left a comment

post-merge tACK 3f9424042b

we should set a style guide actually

As discussed offline, we should do that + some specific dev notes for this repo.

post-merge tACK 3f9424042b7bcaa9a4bafc6a466b3e8d0283325c > we should set a style guide actually As discussed offline, we should do that + some specific dev notes for this repo.
Sign in to join this conversation.
No description provided.