mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:12:38 +00:00
UI Only Custom Datadir #392
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!392
Loading…
Reference in a new issue
No description provided.
Delete branch "qml-custom-datadir-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.qmlUpdate the README at https://github.com/bitcoin-core/gui-qml/tree/main/src/qml with the additional packages that need to be installed.
add newline to end of file
done
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
tACK 3f564606e36fcd2ade2bdc37d5217563a4c442ee
It works as expected, left some code-related nits.
There's a specific case that I mentioned (3rd. bullet point) in the related PR #390, which I now discovered it's due to starting
QTdesktop and afterwards it's closed run theQML(on the same network env - e.g.-signet). I'll create an issue to discuss the best way to solve it.nit: 3rd. commit (f3d251fc93fda956cb8cc14b5717c2485db84781) title length could be shorter, as in the mentioned above related PR , so it can be seen at first glance at the commits list without having to click on the
..., or during reviewing the "files changed" tab section also trying to select one from the commits list.nit: extra space?
nit: indentation
@johnny9, as we discussed on the latest weekly call, linter CI would be useful in cases like this too.
good catch! Done
good call! Done
double-clicking on
Customopens the storage selection in the background.single-click works ok
openbackground.webm
649c2a5af8you addedqml-module-qtquick-dialogs, the other 3qtdeclarative5-devqtquickcontrols2-5-devqml-module-qtquick-controls2should 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:
github.com/bitcoin-core/gui-qml@649c2a5af8/src/qml/README.md (L66)and here:
github.com/bitcoin-core/gui-qml@649c2a5af8/src/qml/README.md (L73)ACK
649c2a5af8Tested static mobile and desktop builds as well as dynamic linux builds and the FileDialog triggers properly with no QML errors.
tACK
649c2a5af8I'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/falsebut couldn't solve it, it would require more investigation and could be done on a follow-up.nits (not blockers):
ffd5201754out, 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 inStorageLocations.qmlI'd comment the lines making those calls to theoptionsModeladding another comment on top of each like "// TODO when model supports it" or similar.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.