UI Only Custom Datadir #392
Conversation
johnny9
left a comment
There was a problem hiding this comment.
Update the README at https://github.com/bitcoin-core/gui-qml/tree/main/src/qml with the additional packages that need to be installed.
b06ce79 to
ed6d17c
Compare
Good call @johnny9! Just pushed a new commit with the updated doc. Now it's pretty much equivalent (give and take) with @jarolrod's #273 |
pablomartin4btc
left a comment
There was a problem hiding this comment.
tACK 3f56460
It works as expected, left some code-related nits.
3f56460 to
649c2a5
Compare
MarnixCroes
left a comment
There was a problem hiding this comment.
double-clicking on Custom opens the storage selection in the background.
single-click works ok
openbackground.webm
649c2a5 you added qml-module-qtquick-dialogs, the other 3 qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick-controls2 should be added to the instructions as well?
Thanks @MarnixCroes, good catch... wasn't able to reproduce on WSL Ubuntu 22.04... Found a potential workaround by adding a timer, will implemented in a future PR since it's little out of scope for this one.
those are actually found here in the qml/README.md: Line 66 in 649c2a5 and here: Line 73 in 649c2a5 |
pablomartin4btc
left a comment
There was a problem hiding this comment.
tACK 649c2a5
I've managed to reproduce the issue reported by @MarnixCroes, on Ubuntu 22.04 it takes a 3 or 4 attempts, but eventually, it occurs. Tried to fix it using visible: true/ false but couldn't solve it, it would require more investigation and could be done on a follow-up.
nits (not blockers):
- Since this is UI only changes, I'd leave commit ffd5201 out, it doesn't change anything in terms of user experience and if we find an issue there, we'd need to revert it (or fix it on top). So in
StorageLocations.qmlI'd comment the lines making those calls to theoptionsModeladding another comment on top of each like "// TODO when model supports it" or similar. - I'd make the new custom datadir path selected from the file dialog visible in 2 places:
-
under the custom datadir field as it's shown in figma:
-
somewhere in the "Storage settings" page but after onboarding process I think (this definitely as a follow-up) but this needs to be discussed with designers (#bitcoin-core-app channel on "Bitcoin Design" discord) because I don't see any reference in figma (unless I missed it)/ cc: @GBKS. It's important here to mention that would be good also to show here the
-datadirpassed as an argument to QT, which won't be persisted inBitcoin-Qt-*.confas the custom data dir, or even the default datadir if that's the case (eg on Ubuntuhome/${user}/.bitcoin) so the user is aware at all times where the data is being taken/ saved at all times.
-
|
Already merged, but I just tested on Android and MacOS and the UI works fine. Nice work on this, sounds like file picking was quite the heavy lift to get done. I agree with the UI proposals up there and will prep respective designs. |
|
I created a follow-up issue for the directory display in storage settings here. Would be great to get your input on the question I have in that issue. |
7a8fb19 qml: UI only display datadir functionality (D33r-Gee) b648cbb qml: added getting custom datadir for display (D33r-Gee) Pull request description: This pull request builds upon #392 and introduces enhancements to display the data directory information within the UI. This functionality encompasses both default and custom data directory paths, fulfilling the UI requirements for user-defined data directory selection initiated in #273. Also the custom datadir is not persistent at the moment it will be once the back end wiring is added. <details> <summary>Ubuntu 22.04 Screenshots</summary>  </details> <details> <summary>Android Screenshots</summary>  </details> As a potential follow-up enhancement, consider incorporating mechanisms for saving the data directory path. This could be achieved through: - Double-click functionality: Allow users to save the displayed path by simply double-clicking on it. This provides a convenient and intuitive method for desktop environments. - Dedicated button: For mobile use cases or scenarios where double-clicking might not be feasible, introduce a dedicated "Save Path" button. This ensures a clear and accessible action for users on various devices. ACKs for top commit: GBKS: ACK 7a8fb19. Looks and feels great, just tested again on MacOS. MarnixCroes: tACK 7a8fb19 on Ubuntu desktop pablomartin4btc: reACK 7a8fb19 Tree-SHA512: 4be20832b72fee99046e78ce45e766ff3f00fc556d57c47311828daa3270d1980fdb2b16b95715024a5835f5730f4a3a347337e9dcc22f57fbaf2ac6711a9f6d
e983d54 doc: updated the qml/README.md with qml-module-qtquick-dialogs (D33r-Gee) 527e498 qml: UI only. Added initial custom datadir functionality without wiring (D33r-Gee) a2d8777 qml: UI only. added setcustomdatadir() method into the options_model files (D33r-Gee) b45aa2d qml: statically link QtQuick2Dialog and FolderListModel plugins (johnny9) 893348e1e0de721cb54063d6179a316629ef484c qml: fix file location path in Controls plugin for Android (johnny9) Pull request description: This pull request is a focused iteration of #390, intended to isolate and test the UI frontend elements. Backend functionality has been intentionally excluded to streamline the testing, review, and merge process. <details> <summary>Ubuntu Screenshots</summary>    </details> **Prerequisites** For testing this pull request, ensure you have the following Qt modules installed: * On Ubuntu 22.04: ```bash sudo apt-get install qtdeclarative5-dev sudo apt-get install qtquickcontrols2-5-dev sudo apt-get install qml-module-qtquick-controls2 sudo apt install qml-module-qtquick-dialogs ``` * For Android: * Make sure you delete the prior depends folder (i.e. `depends/aarch64-linux-android`) and rebuild them. **Implementation Details** This introduces `FileDialog` class for a user-friendly selection experience. * **QML Backend** * Updated `options_model` files to account for custom data directory configuration and placeholders for custom `datadir` wiring. * Added @johnny9 depends patches to allow static building * **QML Frontend** * Updated `StorageLocations.qml` to allow for custom data directory selection. Follow up PR will add display of the custom `datadir` in StorageSettings.qml ACKs for top commit: johnny9: ACK e983d54 pablomartin4btc: tACK e983d54 Tree-SHA512: f480b40aeb28df1515dd191d0fb5e8df94e80cf79c3c468d78b153ebf907b5ad34a97aa0ef6463ac29c6ddebe259b2e3fc1c25c55396c377a9900ce0c68c3edf
92a2a04 qml: UI only display datadir functionality (D33r-Gee) ee8b86e qml: added getting custom datadir for display (D33r-Gee) Pull request description: This pull request builds upon bitcoin-core#392 and introduces enhancements to display the data directory information within the UI. This functionality encompasses both default and custom data directory paths, fulfilling the UI requirements for user-defined data directory selection initiated in bitcoin-core#273. Also the custom datadir is not persistent at the moment it will be once the back end wiring is added. <details> <summary>Ubuntu 22.04 Screenshots</summary>  </details> <details> <summary>Android Screenshots</summary>  </details> As a potential follow-up enhancement, consider incorporating mechanisms for saving the data directory path. This could be achieved through: - Double-click functionality: Allow users to save the displayed path by simply double-clicking on it. This provides a convenient and intuitive method for desktop environments. - Dedicated button: For mobile use cases or scenarios where double-clicking might not be feasible, introduce a dedicated "Save Path" button. This ensures a clear and accessible action for users on various devices. ACKs for top commit: GBKS: ACK 92a2a04. Looks and feels great, just tested again on MacOS. MarnixCroes: tACK 92a2a04 on Ubuntu desktop pablomartin4btc: reACK 92a2a04 Tree-SHA512: 4be20832b72fee99046e78ce45e766ff3f00fc556d57c47311828daa3270d1980fdb2b16b95715024a5835f5730f4a3a347337e9dcc22f57fbaf2ac6711a9f6d
e983d544da4b4382652660809d7d0e9815a2f13f doc: updated the qml/README.md with qml-module-qtquick-dialogs (D33r-Gee) 527e498905cf174c206351251492cc78b7b00ffe qml: UI only. Added initial custom datadir functionality without wiring (D33r-Gee) a2d877768e34d14a9357f99b8f609d9b49c78c05 qml: UI only. added setcustomdatadir() method into the options_model files (D33r-Gee) b45aa2d3425c0ce9af6adda0f26f0cf6fddf14a6 qml: statically link QtQuick2Dialog and FolderListModel plugins (johnny9) 893348e1e0de721cb54063d6179a316629ef484c qml: fix file location path in Controls plugin for Android (johnny9) Pull request description: This pull request is a focused iteration of #390, intended to isolate and test the UI frontend elements. Backend functionality has been intentionally excluded to streamline the testing, review, and merge process. <details> <summary>Ubuntu Screenshots</summary>    </details> **Prerequisites** For testing this pull request, ensure you have the following Qt modules installed: * On Ubuntu 22.04: ```bash sudo apt-get install qtdeclarative5-dev sudo apt-get install qtquickcontrols2-5-dev sudo apt-get install qml-module-qtquick-controls2 sudo apt install qml-module-qtquick-dialogs ``` * For Android: * Make sure you delete the prior depends folder (i.e. `depends/aarch64-linux-android`) and rebuild them. **Implementation Details** This introduces `FileDialog` class for a user-friendly selection experience. * **QML Backend** * Updated `options_model` files to account for custom data directory configuration and placeholders for custom `datadir` wiring. * Added @johnny9 depends patches to allow static building * **QML Frontend** * Updated `StorageLocations.qml` to allow for custom data directory selection. Follow up PR will add display of the custom `datadir` in StorageSettings.qml ACKs for top commit: johnny9: ACK e983d544da4b4382652660809d7d0e9815a2f13f pablomartin4btc: tACK e983d544da4b4382652660809d7d0e9815a2f13f Tree-SHA512: f480b40aeb28df1515dd191d0fb5e8df94e80cf79c3c468d78b153ebf907b5ad34a97aa0ef6463ac29c6ddebe259b2e3fc1c25c55396c377a9900ce0c68c3edf





This pull request is a focused iteration of #390, intended to isolate and test the UI frontend elements. Backend functionality has been intentionally excluded to streamline the testing, review, and merge process.
Ubuntu Screenshots
Prerequisites
For testing this pull request, ensure you have the following Qt modules installed:
depends/aarch64-linux-android) and rebuild them.Implementation Details
This introduces
FileDialogclass for a user-friendly selection experience.options_modelfiles to account for custom data directory configuration and placeholders for customdatadirwiring.StorageLocations.qmlto allow for custom data directory selection.Follow up PR will add display of the custom
datadirin StorageSettings.qml