UI Only Custom Datadir Display #397

Manually merged
D33r-Gee merged 2 commits from qml-custom-datadir-display into main 2024-06-08 08:05:30 +00:00 AGit
D33r-Gee commented 2024-04-11 17:14:44 +00:00 (Migrated from github.com)

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.

Ubuntu 22.04 Screenshots

datadir_desktop

Android Screenshots

datadir_mobile_720

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.

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> ![datadir_desktop](https://git.fish.foo/attachments/7af97e0e-491e-422c-a3ae-0e98822c1b4c) </details> <details> <summary>Android Screenshots</summary> ![datadir_mobile_720](https://git.fish.foo/attachments/9ff2b632-8b8f-4ae4-ab93-4333a4931f47) </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.
johnny9 (Migrated from github.com) requested changes 2024-04-12 22:37:04 +00:00
johnny9 (Migrated from github.com) left a comment

Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice.

https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default

Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice. https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default
johnny9 (Migrated from github.com) commented 2024-04-12 22:33:59 +00:00

What's the reason for having this different for android? Android also scales the fonts based on the dpi already so I'm not sure I understand the dpi factor here

What's the reason for having this different for android? Android also scales the fonts based on the dpi already so I'm not sure I understand the dpi factor here
johnny9 (Migrated from github.com) commented 2024-04-12 22:35:55 +00:00

#ifdef shouldnt be indented

#ifdef shouldnt be indented
johnny9 (Migrated from github.com) commented 2024-04-12 22:35:36 +00:00

#ifdef are never indented

#ifdef are never indented
johnny9 (Migrated from github.com) commented 2024-04-12 22:34:28 +00:00

add a newline to the end of the file

add a newline to the end of the file
pablomartin4btc (Migrated from github.com) reviewed 2024-04-14 02:33:24 +00:00
pablomartin4btc (Migrated from github.com) left a comment

tACK 0025e91fe4ac53e0d8485f3dedb65e8ffff8b50c

  • Noticed the same as @johnny9, proposed a change below (1) which also fixes the prefix of the customDir "file://" before the file dialog gets open or if the user cancels it.

    • screenshot

      Screenshot from 2024-04-12 20-36-30

  • Currently when the user cancels to set a custom datadir the custom option is still checked when perhaps we should go back to the default datadir being checked. So I proposed another change to that (2) with a caveat where if the user sets the custom, then wants to change it again but cancels it, it remains there in the custom checked.

  • We need to tackle the double click issue at some point. I spent some time with it but couldn't solved it yet.

  • First time I run it I got the crash reported by @MarnixCroes on #390, and more often I get another errors related with Gtk image in the console, which I reported (3.) already in #390 as well, both errors are produced as soon as I open the file dialog.

    • crash error

      ** Gtk:ERROR:../../../../gtk/gtkpathbar.c:1342:set_button_image_get_info_cb: assertion failed: (cancellable == data->button_data->cancellable) Bail out! Gtk:ERROR:../../../../gtk/gtkpathbar.c:1342:set_button_image_get_info_cb: assertion failed: (cancellable == data->button_data->cancellable) Aborted (core dumped)

    • Gtk image warning

      (bitcoin-qt:1496162): Gtk-CRITICAL **: 20:32:43.950: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed

tACK 0025e91fe4ac53e0d8485f3dedb65e8ffff8b50c - [Noticed](https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-1998557872) the same as @johnny9, proposed a change below (1) which also fixes the prefix of the `customDir` "`file://`" before the file dialog gets open or if the user cancels it. - <details> <summary>screenshot</summary> ![Screenshot from 2024-04-12 20-36-30](https://git.fish.foo/attachments/5c9d8054-f443-4d5d-8a48-dc8758b98004) </details> - Currently when the user cancels to set a custom datadir the custom option is still checked when perhaps we should go back to the default datadir being checked. So I proposed another change to that (2) with a caveat where if the user sets the custom, then wants to change it again but cancels it, it remains there in the custom checked. - We need to tackle the [double click issue](https://github.com/bitcoin-core/gui-qml/pull/392#pullrequestreview-1973457090) at some point. I spent some time with it but couldn't solved it yet. - First time I run it I got the [crash reported](https://github.com/bitcoin-core/gui-qml/pull/390#issuecomment-2018656948) by @MarnixCroes on #390, and more often I get another errors related with Gtk image in the console, which I [reported](https://github.com/bitcoin-core/gui-qml/pull/390#pullrequestreview-1940546706) (3.) already in #390 as well, both errors are produced as soon as I open the file dialog. - <details> <summary>crash error</summary> `** Gtk:ERROR:../../../../gtk/gtkpathbar.c:1342:set_button_image_get_info_cb: assertion failed: (cancellable == data->button_data->cancellable) Bail out! Gtk:ERROR:../../../../gtk/gtkpathbar.c:1342:set_button_image_get_info_cb: assertion failed: (cancellable == data->button_data->cancellable) Aborted (core dumped)` </details> - <details> <summary>Gtk image warning</summary> `(bitcoin-qt:1496162): Gtk-CRITICAL **: 20:32:43.950: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed` </details>
pablomartin4btc (Migrated from github.com) commented 2024-04-14 02:26:49 +00:00

Part of suggestion (2), assign an identifier to set checked = true on it when user cancels to set custom data dir.

        id: defaultDirOption
        ButtonGroup.group: group
Part of suggestion (2), assign an identifier to set `checked = true` on it when user cancels to set custom data dir. ```suggestion id: defaultDirOption ButtonGroup.group: group ```
pablomartin4btc (Migrated from github.com) commented 2024-04-12 23:34:28 +00:00

Mentioned in the review comment as (1).

        customDir: customDirOption.checked ? fileDialog.folder : ""
Mentioned in the review comment as (1). ```suggestion customDir: customDirOption.checked ? fileDialog.folder : "" ```
pablomartin4btc (Migrated from github.com) commented 2024-04-14 02:29:12 +00:00

Part of suggestion (2), if the users checks the default option, we don't show the custom data dir anymore.

        onClicked: fileDialog.open()
        onCheckedChanged: {
            if (!customDirOption.checked) {
                customDirOption.customDir = ""
            }
        }
Part of suggestion (2), if the users checks the default option, we don't show the custom data dir anymore. ```suggestion onClicked: fileDialog.open() onCheckedChanged: { if (!customDirOption.checked) { customDirOption.customDir = "" } } ```
pablomartin4btc (Migrated from github.com) commented 2024-04-14 02:32:51 +00:00

Part of suggestion (2), when users cancels the file dialog, depending if the users changed the folder (stays in custom) or not (goes back to default).

        onRejected: {
            console.log("Custom datadir selection canceled")
            
            // if the user cancels to set a custom dir from the file dialog
            // default custom datadir check should be ticked
            if (fileDialog.folder == shortcuts.home) { 
                defaultDirOption.checked = true
            } else {
                // unless user accepted first another custom folder and then 
                // going back and forth from default cancels changing custom
                customDirOption.customDir = optionsModel.setCustomDataDirArgs(fileDialog.folder);
            }
Part of suggestion (2), when users cancels the file dialog, depending if the users changed the folder (stays in custom) or not (goes back to default). ```suggestion onRejected: { console.log("Custom datadir selection canceled") // if the user cancels to set a custom dir from the file dialog // default custom datadir check should be ticked if (fileDialog.folder == shortcuts.home) { defaultDirOption.checked = true } else { // unless user accepted first another custom folder and then // going back and forth from default cancels changing custom customDirOption.customDir = optionsModel.setCustomDataDirArgs(fileDialog.folder); } ```
pablomartin4btc (Migrated from github.com) reviewed 2024-04-15 15:22:42 +00:00
pablomartin4btc (Migrated from github.com) commented 2024-04-15 15:22:42 +00:00

Leaving out the fonts discussion, regarding Qt.platform.os === "android", shouldn't we use AppMode.isMobile on qml files instead (unless there's something platform specific of course like WIN32 or __linux__) ? Since the platform was already determined during startup and mode = AppMode::MOBILE was assigned.

Leaving out the fonts discussion, regarding `Qt.platform.os === "android"`, shouldn't we use `AppMode.isMobile` on `qml` files instead (unless there's something platform specific of course like `WIN32` or `__linux__`) ? Since the platform was already determined during startup and `mode = AppMode::MOBILE` was assigned.
D33r-Gee commented 2024-04-15 16:16:05 +00:00 (Migrated from github.com)

Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice.

https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default

To be clear we don't want to display the default datadir path here, correct?

However do we want to display the default path in StorageSettings.qml?

> Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice. > > https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default To be clear we don't want to display the default datadir path here, correct? However do we want to display the default path in StorageSettings.qml?
pablomartin4btc commented 2024-04-15 16:43:57 +00:00 (Migrated from github.com)

Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice.
https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default

To be clear we don't want to display the default datadir path here, correct?

As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure.

Also, sorry if I'm adding confusion here but on a previous PR #390 there was a "Recommended" highlighted label on the default choice when I reviewed it, was that dropped (if ever discussed)?

image

However do we want to display the default path in StorageSettings.qml?

I think so, whatever it is set default or custom.

cc @GBKS

> > Based on both the figma and the web prototype, the path should only be displayed on the custom selection after the user has made a choice. > > https://lively-kashata-cfde7e.netlify.app/screen/first-use/storage-location?state=default > > To be clear we don't want to display the default datadir path here, correct? As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure. Also, sorry if I'm adding confusion here but on a previous PR #390 there was a "Recommended" highlighted label on the default choice [when I reviewed it](https://github.com/bitcoin-core/gui-qml/pull/390#pullrequestreview-1940546706), was that dropped (if ever discussed)? ![image](https://git.fish.foo/attachments/e16fa991-b97b-49dd-9393-57201cd0c462) > However do we want to display the default path in StorageSettings.qml? I think so, whatever it is set default or custom. cc @GBKS
D33r-Gee commented 2024-04-16 17:18:45 +00:00 (Migrated from github.com)

To be clear we don't want to display the default datadir path here, correct?

As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure.

@GBKS and @johnny9 what your thoughts regarding the above?

> > To be clear we don't want to display the default datadir path here, correct? > > As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure. @GBKS and @johnny9 what your thoughts regarding the above?
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:54:31 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:54:31 +00:00

great suggestions... done

great suggestions... done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:54:42 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:54:42 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:54:55 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:54:55 +00:00

also great suggestion

also great suggestion
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:55:27 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:55:27 +00:00

good call folks... done

good call folks... done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:56:02 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:56:02 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:56:08 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:56:08 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 19:56:18 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 19:56:18 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-04-16 20:07:56 +00:00
D33r-Gee (Migrated from github.com) commented 2024-04-16 20:07:56 +00:00

done

done
johnny9 commented 2024-04-17 02:05:23 +00:00 (Migrated from github.com)

To be clear we don't want to display the default datadir path here, correct?

As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure.

@GBKS and @johnny9 what your thoughts regarding the above?

I don't have a strong opinion about this so i would defer to the current figma.

I do think the "Recommended" highlight is redundant as "Default" has the same meaning so I would remove that to match the figma

> > > To be clear we don't want to display the default datadir path here, correct? > > > > > > As of figma, and the web prototype (link above) no, but it won't hurt to show it, I'm not sure. > > @GBKS and @johnny9 what your thoughts regarding the above? I don't have a strong opinion about this so i would defer to the current figma. I do think the "Recommended" highlight is redundant as "Default" has the same meaning so I would remove that to match the figma
GBKS commented 2024-04-17 08:45:53 +00:00 (Migrated from github.com)

Just tested on desktop (Mac) and mobile (Android).

image

I agree with Johnny's rationale about ditching the Recommended label.

Something I noticed is that the directory display of the custom option disappears if I select the default one again (center). It feels unexpected, could we keep that visible?

I could go either way on showing the default directory. Might be more consistent if we just show it, so users know what they are changing from.

For the rightmost screenshot, could we switch to a vertical layout for the directory field? So the directory goes underneath the label? It's a bit awkward to have it squeezed on the right side.

Just tested on desktop (Mac) and mobile (Android). ![image](https://git.fish.foo/attachments/fc465590-f040-426b-94f9-e6623ec61230) I agree with Johnny's rationale about ditching the `Recommended` label. Something I noticed is that the directory display of the custom option disappears if I select the default one again (center). It feels unexpected, could we keep that visible? I could go either way on showing the default directory. Might be more consistent if we just show it, so users know what they are changing from. For the rightmost screenshot, could we switch to a vertical layout for the directory field? So the directory goes underneath the label? It's a bit awkward to have it squeezed on the right side.
mouxdesign commented 2024-04-17 13:54:29 +00:00 (Migrated from github.com)

Storage error message: What would be the error message that a user would see if they choose to proceed but their device does not have sufficient storage?

Storage error message: What would be the error message that a user would see if they choose to proceed but their device does not have sufficient storage?
pablomartin4btc (Migrated from github.com) reviewed 2024-04-23 20:11:28 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re tACK dfc002306b6e6445703c75a87b0725786db33133

Verified my previous feedback got addressed. Usability seems more consistent.

Some observations (perhaps we need to address them with a new "onboarding related" PR):

  • Storage space estimation looks wrong during onboarding (e.g. starting the app simply with bitcoin-qt vs. bitcoin-qt -signet, please expand to see the screenshots) - Also, should we keep "Recommended" highlighted here?
    • bitcoin-qt ("Reduce storage" looks wrong)

      Screenshot from 2024-04-23 12-23-04

    • bitcoin-qt signet ("Store all data" looks wrong)

      Screenshot from 2024-04-23 12-24-39

  • Using -datadir behaviour doesn't trigger the onboarding (neither combined with -chain= option - e.g. -signet with no -datadir triggers the onboarding when signet subdir doesn't exist on default datadir structure but setting -datadir option + -signet with no subdire doesn't) and it should when that custom datadir is empty otherwise:

    ./src/qt/bitcoin-qt -datadir="/home/pablo/custom"
    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    Running initialization in thread
    Warning: Disk space for "/home/pablo/custom/blocks" may not accommodate the block files. Approximately 540 GB of data will be stored in this directory.
    
    
    

@D33r-Gee, could you please try to investigate root of the crash mentioned at the end of my previous review? It seems it happens at the very first time you run bitcoin-qt (need to remove datadir and bitcoin config dir) using the file dialog of course, otherwise it doesn't happen. Most of the time the user would get this error message in the terminal:

(bitcoin-qt:756208): Gtk-CRITICAL **: 10:57:38.210: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed

re tACK dfc002306b6e6445703c75a87b0725786db33133 Verified my previous [feedback](https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-1998733695) got addressed. Usability seems more consistent. <ins>**Some observations**</ins> (perhaps we need to address them with a new "onboarding related" PR): - <details><summary> Storage space estimation looks wrong during onboarding (e.g. starting the app simply with <code>bitcoin-qt</code> vs. <code>bitcoin-qt -signet</code>, please expand to see the screenshots) - Also, should we keep "Recommended" highlighted here?</summary> - `bitcoin-qt` ("Reduce storage" looks wrong) ![Screenshot from 2024-04-23 12-23-04](https://git.fish.foo/attachments/08aaf2c4-3ae6-48d3-8681-2fb123a20a8a) - `bitcoin-qt signet` ("Store all data" looks wrong) ![Screenshot from 2024-04-23 12-24-39](https://git.fish.foo/attachments/0e15888b-b773-4ef5-a187-3c9b9cff1602) </details> - Using `-datadir` behaviour doesn't trigger the onboarding (neither combined with `-chain=` option - e.g. `-signet` with no `-datadir` triggers the onboarding when signet subdir doesn't exist on default datadir structure but setting `-datadir` option + `-signet` with no subdire doesn't) and it should when that custom datadir is empty otherwise: ``` ./src/qt/bitcoin-qt -datadir="/home/pablo/custom" Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Running initialization in thread Warning: Disk space for "/home/pablo/custom/blocks" may not accommodate the block files. Approximately 540 GB of data will be stored in this directory. ``` @D33r-Gee, could you please try to investigate root of the crash mentioned at the end of my previous review? It seems it happens at the very first time you run `bitcoin-qt` (need to remove datadir and bitcoin config dir) using the file dialog of course, otherwise it doesn't happen. Most of the time the user would get this error message in the terminal: `(bitcoin-qt:756208): Gtk-CRITICAL **: 10:57:38.210: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed `
pablomartin4btc commented 2024-04-23 20:41:07 +00:00 (Migrated from github.com)

Just tested on desktop (Mac) and mobile (Android).

@GBKS for future reference, please add the commit version you've tested if possible so we can verify if it's the latest or a previous one.

I agree with Johnny's rationale about ditching the Recommended label.

Ok, please check the next page when user has to select the amount of space to store, there's also a "Recommended" highlighted label.

Something I noticed is that the directory display of the custom option disappears if I select the default one again (center). It feels unexpected, could we keep that visible?

I've proposed to hide it when a user goes back to default datadir to avoid confusion, as in when a user sees the page for the first time won't see the custom datadir until the user clicks on it and set it. Is it necessary if that's not the datadir that's going to be used?

I could go either way on showing the default directory. Might be more consistent if we just show it, so users know what they are changing from.

I'd show it but I've also thought if we can add an external link, not sure if with an information icon or something, to the bitcoin datadir documentation.

> Just tested on desktop (Mac) and mobile (Android). @GBKS for future reference, please add the commit version you've tested if possible so we can verify if it's the latest or a previous one. > I agree with Johnny's rationale about ditching the `Recommended` label. Ok, please check the next page when user has to select the amount of space to store, there's also a "Recommended" highlighted label. > Something I noticed is that the directory display of the custom option disappears if I select the default one again (center). It feels unexpected, could we keep that visible? I've proposed to hide it when a user goes back to default datadir to avoid confusion, as in when a user sees the page for the first time won't see the custom datadir until the user clicks on it and set it. Is it necessary if that's not the datadir that's going to be used? > I could go either way on showing the default directory. Might be more consistent if we just show it, so users know what they are changing from. I'd show it but I've also thought if we can add an external link, not sure if with an information icon or something, to the bitcoin datadir [documentation](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location).
pablomartin4btc commented 2024-04-23 20:44:47 +00:00 (Migrated from github.com)

Storage error message: What would be the error message that a user would see if they choose to proceed but their device does not have sufficient storage?

I think that should be after accepting (clicking on next) the following page "Reduce store"/ "Store all data" (before starting the initial download sync).

> Storage error message: What would be the error message that a user would see if they choose to proceed but their device does not have sufficient storage? I think that should be after accepting (clicking on next) the following page "Reduce store"/ "Store all data" (before starting the initial download sync).
GBKS commented 2024-04-24 09:00:21 +00:00 (Migrated from github.com)

How about one of these two options for the error message?

image

How about one of these two options for the error message? ![image](https://git.fish.foo/attachments/9491673d-4790-4f57-915b-1784fb590813)
pablomartin4btc commented 2024-04-24 22:35:37 +00:00 (Migrated from github.com)

How about one of these two options for the error message?

As discussed on the designers call today, just keep in mind that the validation should be on the next page:

image

(crossed 9GB in red as it's incorrect)

> How about one of these two options for the error message? As discussed on the designers call today, just keep in mind that the [validation should be on the next page](https://github.com/bitcoin-core/gui-qml/pull/397#issuecomment-2073413367): ![image](https://git.fish.foo/attachments/c0fb7126-2fa4-453e-beec-024b8617751c) (crossed 9GB in red as it's incorrect)
GBKS commented 2024-04-25 06:46:08 +00:00 (Migrated from github.com)

Can we detect how much space is available on each location and show it? And can we estimate the required space needed (the mock-up uses 500GB as a placeholder, which is meant to be replaced with something accurate).

Can we detect how much space is available on each location and show it? And can we estimate the required space needed (the mock-up uses 500GB as a placeholder, which is meant to be replaced with something accurate).
D33r-Gee commented 2024-05-01 14:32:56 +00:00 (Migrated from github.com)

Rebased over main dfc0023 to 2fbb27a

Rebased over main [dfc0023 ](https://github.com/bitcoin-core/gui-qml/commit/dfc002306b6e6445703c75a87b0725786db33133)to [2fbb27a](https://github.com/bitcoin-core/gui-qml/commit/2fbb27a37a7c666f49a25465863dcafd9d0713f5)
D33r-Gee commented 2024-05-01 20:32:13 +00:00 (Migrated from github.com)

@GBKS and @pablomartin4btc Thanks for the feedback regarding the storage amount and the error messaging.
those will be addressed in a different PR since this is only for datadir display

Meanwhile please me know your thoughts on the latest update 8e8aadf?

@GBKS and @pablomartin4btc Thanks for the feedback regarding the storage amount and the error messaging. those will be addressed in a different PR since this is only for datadir display Meanwhile please me know your thoughts on the latest update [8e8aadf](https://github.com/bitcoin-core/gui-qml/commit/8e8aadf2396e54428c0ca5ae562030734d0650cf)?
MarnixCroes (Migrated from github.com) reviewed 2024-05-01 21:10:30 +00:00
MarnixCroes (Migrated from github.com) left a comment

8e8aadf2396e54428c0ca5ae562030734d0650cf
I cannot repro the double-click issue anymore https://github.com/bitcoin-core/gui-qml/pull/399
friendly ping @pablomartin4btc


one issue/inconsistency:
the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings:
onboarding -> select custom data dir -> next -> click Detailed settings -> default data dir is displayed -> next -> next -> arrive at home screen -> go to settings -> storage -> data directory displays the custom data dir

8e8aadf2396e54428c0ca5ae562030734d0650cf I cannot repro the double-click issue anymore https://github.com/bitcoin-core/gui-qml/pull/399 friendly ping @pablomartin4btc --- one issue/inconsistency: the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings: onboarding -> select custom data dir -> next -> click `Detailed settings` -> default data dir is displayed -> next -> next -> arrive at home screen -> go to `settings` -> `storage` -> data directory displays the custom data dir
D33r-Gee commented 2024-05-01 21:18:47 +00:00 (Migrated from github.com)

8e8aadf I cannot repro the double-click issue anymore #399 friendly ping @pablomartin4btc

That's great to hear...

one issue/inconsistency: the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings: onboarding -> select custom data dir -> next -> click Detailed settings -> default data dir is displayed -> next -> next -> arrive at home screen -> go to settings -> storage -> data directory displays the custom data dir

Could you post a screenshot please?

> [8e8aadf](https://github.com/bitcoin-core/gui-qml/commit/8e8aadf2396e54428c0ca5ae562030734d0650cf) I cannot repro the double-click issue anymore #399 friendly ping @pablomartin4btc > That's great to hear... > one issue/inconsistency: the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings: onboarding -> select custom data dir -> next -> click `Detailed settings` -> default data dir is displayed -> next -> next -> arrive at home screen -> go to `settings` -> `storage` -> data directory displays the custom data dir > Could you post a screenshot please?
pablomartin4btc (Migrated from github.com) reviewed 2024-05-01 21:34:25 +00:00
pablomartin4btc (Migrated from github.com) left a comment

8e8aadf I cannot repro the double-click issue anymore #399 friendly ping @pablomartin4btc

Ok, thanks for letting me know... I'll do another test on the latest version of this PR.

> [8e8aadf](https://github.com/bitcoin-core/gui-qml/commit/8e8aadf2396e54428c0ca5ae562030734d0650cf) I cannot repro the double-click issue anymore #399 friendly ping @pablomartin4btc Ok, thanks for letting me know... I'll do another test on the latest version of this PR.
MarnixCroes commented 2024-05-01 21:46:55 +00:00 (Migrated from github.com)

Could you post a screenshot please?

during onboarding:

Screenshot from 2024-05-01 23-45-12

Screenshot from 2024-05-01 23-45-19

after onboarding, at settings
Screenshot from 2024-05-01 23-45-28

> Could you post a screenshot please? during onboarding: ![Screenshot from 2024-05-01 23-45-12](https://git.fish.foo/attachments/67934fd4-6de6-41bd-a8b1-cdec43e71124) ![Screenshot from 2024-05-01 23-45-19](https://git.fish.foo/attachments/90b28e2c-2d32-4144-8bf3-7e5c10113c5c) after onboarding, at settings ![Screenshot from 2024-05-01 23-45-28](https://git.fish.foo/attachments/bda5622b-2ef0-4a9b-91ac-48dfecbfa397)
D33r-Gee commented 2024-05-01 21:55:36 +00:00 (Migrated from github.com)

@MarnixCroes Thanks for the screenshots... I see what you mean... Looking into it

@MarnixCroes Thanks for the screenshots... I see what you mean... Looking into it
pablomartin4btc (Migrated from github.com) reviewed 2024-05-04 05:28:51 +00:00
pablomartin4btc (Migrated from github.com) left a comment

tACK 8e8aadf2396e54428c0ca5ae562030734d0650cf

I'm not sure about showing the default path when the user has selected the custom one but not a blocker.

8e8aadf
I cannot repro the double-click issue anymore #399
friendly ping @pablomartin4btc

I can still do it (being on custom data dir selected, just double clicking on it).

image

one issue/inconsistency:
the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings:
onboarding -> select custom data dir -> next -> click Detailed settings -> default data dir is displayed -> next -> next -> arrive at home screen -> go to settings -> storage -> data directory displays the custom data dir

I could repro this ^; it looks like the model hasn't been refreshed? Are we sure it's the same instance of the options model (not a copy)? cc @johnny9.

tACK 8e8aadf2396e54428c0ca5ae562030734d0650cf I'm not sure about showing the default path when the user has selected the custom one but not a blocker. > [8e8aadf](https://github.com/bitcoin-core/gui-qml/commit/8e8aadf2396e54428c0ca5ae562030734d0650cf) I cannot repro the double-click issue anymore #399 friendly ping @pablomartin4btc <details> <summary>I can still do it (being on custom data dir selected, just double clicking on it).</summary> ![image](https://git.fish.foo/attachments/d5d50741-6243-4593-8906-7cdf1656b36b) </details> > one issue/inconsistency: the selected custom data dir is not updated/displayed correctly during the onboarding, but it as at settings: onboarding -> select custom data dir -> next -> click Detailed settings -> default data dir is displayed -> next -> next -> arrive at home screen -> go to settings -> storage -> data directory displays the custom data dir I could repro this ^; it looks like the model hasn't been refreshed? Are we sure it's the same instance of the options model (not a copy)? cc @johnny9.
D33r-Gee commented 2024-05-06 14:01:37 +00:00 (Migrated from github.com)

Thanks @pablomartin4btc for testing it

I'm not sure about showing the default path when the user has selected the custom one but not a blocker.

I could go either way, however it feels consistent to show the default datadir regardless since if the user is going through onboarding there's a high chance it might be their first time installing Bitcoin Core, and knowing where the default data is store might be helpful. Any thoughts @GBKS?

RE: @MarnixCroes comment about displaying the default datadir instead of custom, it seems StorageSettings is not refreshing until the node launches so it's not registering the change from default to custom datadir, I believe that this get addressed with #284. Going to test to confirm on separate branch...

Thanks @pablomartin4btc for testing it > I'm not sure about showing the default path when the user has selected the custom one but not a blocker. I could go either way, however it feels consistent to show the default datadir regardless since if the user is going through onboarding there's a high chance it might be their first time installing Bitcoin Core, and knowing where the default data is store might be helpful. Any thoughts @GBKS? RE: @MarnixCroes comment about displaying the default datadir instead of custom, it seems StorageSettings is not refreshing until the node launches so it's not registering the change from default to custom datadir, I believe that this get addressed with #284. Going to test to confirm on separate branch...
D33r-Gee commented 2024-05-06 19:10:23 +00:00 (Migrated from github.com)

with the latest commit 2a301e1 addressed @MarnixCroes comment about the datadir not displaying properly during onboarding. Turns out made the mistake of not using the setter function for the customDataDir bool.

Please let me know if it displays correctly for ya'll @pablomartin4btc @johnny9 @GBKS @MarnixCroes ?

with the latest commit [2a301e1](https://github.com/bitcoin-core/gui-qml/commit/2a301e117f6e83611b08a3d6242ed6aaa1f4caa5) addressed @MarnixCroes comment about the datadir not displaying properly during onboarding. Turns out made the mistake of not using the setter function for the customDataDir bool. Please let me know if it displays correctly for ya'll @pablomartin4btc @johnny9 @GBKS @MarnixCroes ?
pablomartin4btc (Migrated from github.com) reviewed 2024-05-06 22:11:14 +00:00
pablomartin4btc (Migrated from github.com) left a comment

tACK 2a301e117f6e83611b08a3d6242ed6aaa1f4caa5

The issue/ inconsistency reported by @MarnixCroes has been fixed.

Screenshot from 2024-05-06 18-42-42

I noticed another bug which is: if the user clicks on custom, the file dialogs opens, the user creates a folder or moves around dirs but cancels the dialog, the custom option will be kept ticked/ selected but with no path and if the user continues the default will be stored.

image

On the default path shown when custom is selected:

it feels consistent to show the default datadir regardless

I'm still not sure because when the user lands into this page, no custom data dir has been selected so nothing is shown. When the 2 paths are shown someone could think that some data is still stored on the default path? Again, not a blocker.

tACK 2a301e117f6e83611b08a3d6242ed6aaa1f4caa5 <details> <summary>The issue/ inconsistency <a href="https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-2034467887">reported</a> by @MarnixCroes has been fixed.</summary> ![Screenshot from 2024-05-06 18-42-42](https://git.fish.foo/attachments/c9f68db8-9c77-49ab-87cc-1ad99ca30450) </details> <details> <summary>I noticed another bug which is: if the user clicks on custom, the file dialogs opens, the user creates a folder or moves around dirs but cancels the dialog, the custom option will be kept ticked/ selected but with no path and if the user continues the default will be stored.</summary> ![image](https://git.fish.foo/attachments/1da09a5a-bdff-4c9b-9077-a290c431d2be) </details> On the default path shown when custom is selected: > it feels consistent to show the default datadir regardless I'm still not sure because when the user lands into this page, no custom data dir has been selected so nothing is shown. When the 2 paths are shown someone could think that some data is still stored on the default path? Again, not a blocker.
pablomartin4btc (Migrated from github.com) commented 2024-05-06 22:10:26 +00:00

It seems confusing the current naming convention here, also: do we need to store a bool?; perhaps @johnny9 has a better naming since he has been working with the options model already, mine is just an idea.

    bool isCustomDataDirSet() const { return (!getCustomDataDirString().isEmpty() && (getDefaultDataDirString() != getCustomDataDirString())); }
It seems confusing the current naming convention here, also: do we need to store a bool?; perhaps @johnny9 has a better naming since he has been working with the options model already, mine is just an idea. ```suggestion bool isCustomDataDirSet() const { return (!getCustomDataDirString().isEmpty() && (getDefaultDataDirString() != getCustomDataDirString())); } ```
D33r-Gee (Migrated from github.com) reviewed 2024-05-07 16:55:50 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-07 16:55:50 +00:00

yes a bool is needed here so that StorageSettings.qml relfects the proper data directory (either default or custom).

yes a bool is needed here so that StorageSettings.qml relfects the proper data directory (either default or custom).
D33r-Gee commented 2024-05-07 17:18:26 +00:00 (Migrated from github.com)

Thanks @pablomartin4btc for testing and reviewing

I noticed another bug which is: if the user clicks on custom...

addressed this with the latest push from 2a301e1 to 61e775b

Now when a user cancels after having picked a custom datadir it reverts back to default

Thanks @pablomartin4btc for testing and reviewing > I noticed another bug which is: if the user clicks on custom... addressed this with the latest push from [2a301e1 ](https://github.com/bitcoin-core/gui-qml/commit/2a301e117f6e83611b08a3d6242ed6aaa1f4caa5)to [61e775b](https://github.com/bitcoin-core/gui-qml/commit/61e775b0d7f18328e6f04e6a99cb70017fe00539) Now when a user cancels after having picked a custom datadir it reverts back to default
pablomartin4btc (Migrated from github.com) reviewed 2024-05-07 21:46:18 +00:00
pablomartin4btc (Migrated from github.com) commented 2024-05-07 21:46:18 +00:00

ok but do we need that instance variable (m_custom_datadir) to store it or it can be dynamically calculated as suggested?

ok but do we need that instance variable (`m_custom_datadir`) to store it or it can be dynamically calculated as suggested?
GBKS commented 2024-05-08 12:52:04 +00:00 (Migrated from github.com)

Just tested the latest build, which I believe is 61e775b , on MacOS and Android.

image

Nice to see this come together. Just have some small comments:

  • Tapping anywhere in the directory option should activate it. This does not seem to work when tapping the light grey directory display box inside the item. Does it maybe intercept the click/tap event and prevent it from propagating to its parent?
  • On the settings page, the directory name seems to have the wrong color and too much spacing to the option title above it

Regarding the point about consistency for showing the directory box, I'd show it if it has a value. The default one can always be visible. And if the user has set one for the custom option, it can also be shown independent of whether that option is still selected or not. And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.

Quite the long thread, hope I didn't miss anything. Maybe good to address things like the error message in a separate PR to keep things manageable.

Just tested the [latest build](https://github.com/bitcoin-core/gui-qml/actions/runs/8989560816), which I believe is 61e775b , on MacOS and Android. ![image](https://git.fish.foo/attachments/b5d1a369-e062-4e49-b6aa-c601b2c2fc17) Nice to see this come together. Just have some small comments: - Tapping anywhere in the directory option should activate it. This does not seem to work when tapping the light grey directory display box inside the item. Does it maybe intercept the click/tap event and prevent it from propagating to its parent? - On the settings page, the directory name seems to have the wrong color and too much spacing to the option title above it Regarding the point about consistency for showing the directory box, I'd show it if it has a value. The default one can always be visible. And if the user has set one for the custom option, it can also be shown independent of whether that option is still selected or not. And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me. Quite the long thread, hope I didn't miss anything. Maybe good to address things like the error message in a separate PR to keep things manageable.
D33r-Gee (Migrated from github.com) reviewed 2024-05-08 13:51:40 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-08 13:51:40 +00:00

Certainly, adhering to the established conventions for options would suggest utilizing m_custom_datadir. However, if a more refined approach emerges, we could potentially explore its implementation in a subsequent pull request.

Certainly, adhering to the established conventions for options would suggest utilizing m_custom_datadir. However, if a more refined approach emerges, we could potentially explore its implementation in a subsequent pull request.
D33r-Gee commented 2024-05-08 16:18:44 +00:00 (Migrated from github.com)

Thanks @GBKS for testing and reviewing...

This:

Tapping anywhere in the directory option should activate it. This does not seem to work when tapping the light grey directory display box inside the item. Does it maybe intercept the click/tap event and prevent it from propagating to its parent?

Is addressed with the latest push b941932

On the settings page, the directory name seems to have the wrong color

what would be the correct color?

And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.

this use case may be problematic since if the user cancels it currently reverts back to default, are you suggesting that if there was a previously selected folder then the custom option should remain selected even after the user cancels a secondary attempt at setting the custom datadir?

Thanks @GBKS for testing and reviewing... This: > Tapping anywhere in the directory option should activate it. This does not seem to work when tapping the light grey directory display box inside the item. Does it maybe intercept the click/tap event and prevent it from propagating to its parent? Is addressed with the latest push [b941932](https://github.com/bitcoin-core/gui-qml/commit/b941932926a55144d78e2ae07b721cf38ad48639) > On the settings page, the directory name seems to have the wrong color what would be the correct color? > And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me. this use case may be problematic since if the user cancels it currently reverts back to default, are you suggesting that if there was a previously selected folder then the custom option should remain selected even after the user cancels a secondary attempt at setting the custom datadir?
D33r-Gee commented 2024-05-10 15:55:32 +00:00 (Migrated from github.com)

with the latest push from b941932 to 0c46cae addressed @GBKS comment regarding the proper color for datadir display, by adding a new state ("DIRECTORY") in ValueInput.qml

Next is addressing this:

And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.

with the latest push from [b941932 ](https://github.com/bitcoin-core/gui-qml/commit/b941932926a55144d78e2ae07b721cf38ad48639)to [0c46cae](https://github.com/bitcoin-core/gui-qml/commit/0c46caeac5c9f9166ae8891987f1f9bf626dbd4d) addressed @GBKS comment regarding the proper color for datadir display, by adding a new `state` ("DIRECTORY") in ValueInput.qml Next is addressing this: > And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.
D33r-Gee commented 2024-05-10 16:14:23 +00:00 (Migrated from github.com)

new commit 855cea5 addressing this use case

And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.

Now when the user has picked/accepted a custom datadir and then decides to change it but cancels the selection it stays with the custom datadir previously selected unless they click on the default option

new commit [855cea5](https://github.com/bitcoin-core/gui-qml/commit/855cea5fd27d227ce595cb06a3fd281438a6d0b6) addressing this use case > And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me. Now when the user has picked/accepted a custom datadir and then decides to change it but cancels the selection it stays with the custom datadir previously selected unless they click on the default option
D33r-Gee commented 2024-05-16 17:38:38 +00:00 (Migrated from github.com)

rebased new head is ce6866a9adf408625f6506497f9e78b6b663cadf

rebased new head is ce6866a9adf408625f6506497f9e78b6b663cadf
johnny9 (Migrated from github.com) reviewed 2024-05-17 03:28:22 +00:00
johnny9 (Migrated from github.com) left a comment

Don't overload ValueInput for non input items. Just use CoreText or Label

Don't overload ValueInput for non input items. Just use CoreText or Label
johnny9 (Migrated from github.com) commented 2024-05-17 03:27:27 +00:00

This isnt an Input so just use CoreText

This isnt an Input so just use CoreText
johnny9 (Migrated from github.com) commented 2024-05-17 03:27:43 +00:00

Remove this state as its not appropriate

Remove this state as its not appropriate
johnny9 (Migrated from github.com) commented 2024-05-17 03:18:36 +00:00

spacing is off here

spacing is off here
johnny9 (Migrated from github.com) commented 2024-05-17 03:16:05 +00:00

The confusion here is around the name of the variable. customDataDir implies it is a string. A better name for a bool would be isCustomDataDirSet or usingCustomDataDir and customDataDir should just be the name for the string.

The confusion here is around the name of the variable. customDataDir implies it is a string. A better name for a bool would be isCustomDataDirSet or usingCustomDataDir and customDataDir should just be the name for the string.
johnny9 (Migrated from github.com) commented 2024-05-17 03:18:08 +00:00

I prefer the dynamic calculation of the state myself. It is clearer to me

I prefer the dynamic calculation of the state myself. It is clearer to me
D33r-Gee (Migrated from github.com) reviewed 2024-05-17 15:40:49 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-17 15:40:49 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-05-20 22:06:39 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-20 22:06:39 +00:00

done

done
D33r-Gee (Migrated from github.com) reviewed 2024-05-20 22:08:58 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-20 22:08:58 +00:00

Thanks for the suggestions, decided to go with a dynamic string variable instead of managing the customDataDir bool... Let me know your thoughts?

Thanks for the suggestions, decided to go with a dynamic string variable instead of managing the customDataDir bool... Let me know your thoughts?
D33r-Gee (Migrated from github.com) reviewed 2024-05-20 22:24:57 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-20 22:24:57 +00:00

done

done
D33r-Gee commented 2024-05-20 22:28:55 +00:00 (Migrated from github.com)

Updated from ce6866a to 2e2fe79

Main changes were implementing @johnny9 and @pablomartin4btc feedback...

RE: customDataDir bool, decided to go with a dynamic setting of dataDir since the bool options was giving me grief...

Please let me know your thoughts?

Updated from [ce6866a ](https://github.com/bitcoin-core/gui-qml/commit/ce6866a9adf408625f6506497f9e78b6b663cadf)to [2e2fe79](https://github.com/bitcoin-core/gui-qml/commit/2e2fe79b5af3262fca050d98fbbb639ccb0d6343) Main changes were implementing @johnny9 and @pablomartin4btc feedback... RE: `customDataDir` bool, decided to go with a dynamic setting of `dataDir` since the bool options was giving me grief... Please let me know your thoughts?
johnny9 (Migrated from github.com) approved these changes 2024-05-21 02:38:41 +00:00
johnny9 (Migrated from github.com) requested changes 2024-05-21 03:14:22 +00:00
johnny9 (Migrated from github.com) left a comment

Seems to be an issue with building the Android target

"qml/models/options_model.cpp:186:55: error: no matching member function for call to 'replace'
m_custom_datadir_string = m_custom_datadir_string.replace("content://com.android.externalstorage.documents/tree/primary%3A", "/storage/self/primary/");"

Seems to be an issue with building the Android target "qml/models/options_model.cpp:186:55: error: no matching member function for call to 'replace' m_custom_datadir_string = m_custom_datadir_string.replace("content://com.android.externalstorage.documents/tree/primary%3A", "/storage/self/primary/");"
D33r-Gee commented 2024-05-21 18:06:20 +00:00 (Migrated from github.com)

Seems to be an issue with building the Android target

"qml/models/options_model.cpp:186:55: error: no matching member function for call to 'replace' m_custom_datadir_string = m_custom_datadir_string.replace("content://com.android.externalstorage.documents/tree/primary%3A", "/storage/self/primary/");"

Thanks for discovering this... Found the cause of the problem, I mistakenly left the added const to the getter function. I removed them and now it builds properly for both Android and Linux

> Seems to be an issue with building the Android target > > "qml/models/options_model.cpp:186:55: error: no matching member function for call to 'replace' m_custom_datadir_string = m_custom_datadir_string.replace("content://com.android.externalstorage.documents/tree/primary%3A", "/storage/self/primary/");" Thanks for discovering this... Found the cause of the problem, I mistakenly left the added `const` to the getter function. I removed them and now it builds properly for both Android and Linux
johnny9 (Migrated from github.com) approved these changes 2024-05-22 03:54:25 +00:00
johnny9 (Migrated from github.com) left a comment

ACK 7341bdf839040bba2895290f3a59adc7a48132c2

ACK 7341bdf839040bba2895290f3a59adc7a48132c2
MarnixCroes (Migrated from github.com) approved these changes 2024-05-22 10:41:51 +00:00
MarnixCroes (Migrated from github.com) left a comment

tested lgtm 7341bdf839040bba2895290f3a59adc7a48132c2

one nit/UX thing: select/have a custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again.
for me it would be more intuitive to not prompt the storage location for one click -> only when double-clicking. when clicking on the custom datadir again

tested lgtm 7341bdf839040bba2895290f3a59adc7a48132c2 one nit/UX thing: select/have a custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again. for me it would be more intuitive to not prompt the storage location for one click -> only when double-clicking. when clicking on the custom datadir again
MarnixCroes commented 2024-05-22 10:42:43 +00:00 (Migrated from github.com)

FTR, can repro the double-click in background issue on latest commit. not sure why previously I couldn't repro https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-2034467887

FTR, can repro the double-click in background issue on latest commit. not sure why previously I couldn't repro https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-2034467887
GBKS commented 2024-05-22 12:38:51 +00:00 (Migrated from github.com)

The MacOS workflow runs seem to fail for this PR (also for 401). Would it be possible to fix those to simplify testing?

The MacOS workflow runs seem to fail for this PR (also for 401). Would it be possible to fix those to simplify testing?
D33r-Gee commented 2024-05-22 15:12:50 +00:00 (Migrated from github.com)

one nit/UX thing: select/have a custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again. for me it would be more intuitive to not prompt the storage location for one click -> only when double-clicking. when clicking on the custom datadir again

Thanks for testing and the feedback. That's a good point, will add it to the polishing features alongside the error messaging. One thing to keep in mind is that on mobile "double-tapping" is uncommon so we'll have to play with it to see what feels most natural.

> one nit/UX thing: select/have a custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again. for me it would be more intuitive to not prompt the storage location for one click -> only when double-clicking. when clicking on the custom datadir again Thanks for testing and the feedback. That's a good point, will add it to the polishing features alongside the error messaging. One thing to keep in mind is that on mobile "double-tapping" is uncommon so we'll have to play with it to see what feels most natural.
D33r-Gee commented 2024-05-22 15:16:23 +00:00 (Migrated from github.com)

The MacOS workflow runs seem to fail for this PR (also for 401). Would it be possible to fix those to simplify testing?

Hmmm... well that's problematic... will discuss with the other devs and see what can be done... Thanks for pointing it out!

> The MacOS workflow runs seem to fail for this PR (also for 401). Would it be possible to fix those to simplify testing? Hmmm... well that's problematic... will discuss with the other devs and see what can be done... Thanks for pointing it out!
pablomartin4btc (Migrated from github.com) approved these changes 2024-05-23 15:36:27 +00:00
pablomartin4btc (Migrated from github.com) left a comment

tACK 7341bdf839040bba2895290f3a59adc7a48132c2

Another UX nit: when a user selects a custom datadir and accepts it, clicks again on custom datadir to open the file dialog, creates a different custom dir but cancels the dialog, it goes wrongly to tick/ check the default datadir. Perhaps we can correct that on a follow-up.

Standing issues to follow-up:

  • Custom Datadir double click (check workaround at #399).
  • custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again (reported by @MarnixCroes)
    • not sure about differentiation between 1 click (for just tick the custom dir) or double to open a file dialog, perhaps adding a button/ icon to open the dialog but would break this design, I'd leave this to the design experts.

I still get this error the first time I run QT and open the File Dialog... could be something related with my initial env, after the first time it's not reproducible, leaving the comment here to follow-up later:

edit: (sorry, forgot to add the error...)

(bitcoin-qt:1496162): Gtk-CRITICAL **: 20:32:43.950: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed

tACK 7341bdf839040bba2895290f3a59adc7a48132c2 Another <ins>UX nit</ins>: when a user selects a custom datadir and accepts it, clicks again on custom datadir to open the file dialog, creates a different custom dir but cancels the dialog, it goes wrongly to tick/ check the default datadir. Perhaps we can correct that on a follow-up. Standing issues to follow-up: - Custom Datadir double click (check workaround at #399). - custom data dir -> select default data dir -> select custom data dir -> it prompts the folder location selection again ([reported](https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-2070826537) by @MarnixCroes) - not sure about differentiation between 1 click (for just tick the custom dir) or double to open a file dialog, perhaps adding a button/ icon to open the dialog but would break this design, I'd leave this to the design experts. I still get this error the first time I run QT and open the File Dialog... could be something related with my initial env, after the first time it's not reproducible, leaving the comment here to follow-up later: **edit**: (sorry, forgot to add the error...) `(bitcoin-qt:1496162): Gtk-CRITICAL **: 20:32:43.950: gtk_image_set_from_gicon: assertion 'GTK_IS_IMAGE (image)' failed`
pablomartin4btc (Migrated from github.com) commented 2024-05-23 14:31:19 +00:00

what the Args suffix in setCustomDataDirArgs stands for? Also because we have the option -datadir passed from the command line.

what the `Args` suffix in `setCustomDataDirArgs` stands for? Also because we have the option `-datadir` passed from the command line.
pablomartin4btc (Migrated from github.com) commented 2024-05-23 14:41:50 +00:00

nit: why not having something like proposed here? It'd be easier to follow I think.

        if (!isCustomDataDirSet) {
nit: why not having something like proposed [here](https://github.com/bitcoin-core/gui-qml/pull/397#discussion_r1604297033)? It'd be easier to follow I think. ```suggestion if (!isCustomDataDirSet) { ```
pablomartin4btc commented 2024-05-23 15:39:53 +00:00 (Migrated from github.com)

Regarding the point about consistency for showing the directory box, I'd show it if it has a value. The default one can always be visible. And if the user has set one for the custom option, it can also be shown independent of whether that option is still selected or not. And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me.

@GBKS: Agreed. Just found another case (ref.: "Another UX nit").

> Regarding the point about consistency for showing the directory box, I'd show it if it has a value. The default one can always be visible. And if the user has set one for the custom option, it can also be shown independent of whether that option is still selected or not. And if the user goes to the directory picker and cancels out of it, the previously picked option can remain active. That seems intuitive to me. @GBKS: Agreed. Just found another [case](https://github.com/bitcoin-core/gui-qml/pull/397#pullrequestreview-2074161733) (ref.: "Another <ins>UX nit</ins>").
D33r-Gee commented 2024-05-27 20:08:48 +00:00 (Migrated from github.com)

c2e73b2 rebased over main

[c2e73b2](https://github.com/bitcoin-core/gui-qml/commit/c2e73b259802c5644859542c785eb46f93911841) rebased over main
D33r-Gee (Migrated from github.com) reviewed 2024-05-27 20:15:38 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-27 20:15:38 +00:00

Thanks for your suggestion... after testing it became clear that not depending on a new bool would be the way to go. And so implemented yours and Johnny9 suggestions as part of a new dataDir variable.

Thanks for your suggestion... after testing it became clear that not depending on a new `bool` would be the way to go. And so implemented yours and Johnny9 suggestions as part of a new `dataDir` variable.
D33r-Gee (Migrated from github.com) reviewed 2024-05-27 20:18:30 +00:00
D33r-Gee (Migrated from github.com) commented 2024-05-27 20:18:30 +00:00

The Args suffix will come in play when the actual backend is connected since it will modify the gArgs so that the new datadir is set properly.

The `Args` suffix will come in play when the actual backend is connected since it will modify the `gArgs` so that the new `datadir` is set properly.
MarnixCroes (Migrated from github.com) reviewed 2024-05-30 13:58:32 +00:00
MarnixCroes (Migrated from github.com) left a comment

c2e73b259802c5644859542c785eb46f93911841

it can happen that the GUI completely freezes
can't do anything, need to close the app.
can repro most of the time, but not 100%

maybe a bit of an edge case, as it's not the usual user flow for how to repro

repro steps
  • run with resetguisettings
  • at Storage location dialog click custom
  • click back (so don't select a location) (can also repro when selecting the location)
  • click on default
  • then double-click on custom

qmlguifreeze.webm

c2e73b259802c5644859542c785eb46f93911841 ~it can happen that the GUI completely freezes~ ~can't do anything, need to close the app.~ ~can repro most of the time, but not 100%~ ~maybe a bit of an edge case, as it's not the usual user flow for how to repro~ <details> <summary>repro steps</summary> <br> - run with resetguisettings - at Storage location dialog click `custom` - click back (so don't select a location) (can also repro when selecting the location) - click on default - then double-click on `custom` </details> [qmlguifreeze.webm](https://github.com/bitcoin-core/gui-qml/assets/93143998/379343bb-b3c5-49fc-ad24-922cf2b9a626)
D33r-Gee commented 2024-05-30 15:35:40 +00:00 (Migrated from github.com)

it can happen that the GUI completely freezes can't do anything, need to close the app. can repro most of the time, but not 100%

maybe a bit of an edge case, as it's not the usual user flow for how to repro

Couldn't repro on WSL Ubuntu 22.04. Kept on double/triple clicking and nothing froze...

However was able to approximately repro the "double click" (#399) from my experience the first click opens the dialog and if it opens away from the custom area then the second click will push the dialog window behind the app window which I believe is proper file dialog behavior.

> it can happen that the GUI completely freezes can't do anything, need to close the app. can repro most of the time, but not 100% > > maybe a bit of an edge case, as it's not the usual user flow for how to repro > Couldn't repro on WSL Ubuntu 22.04. Kept on double/triple clicking and nothing froze... However was able to approximately repro the "double click" (#399) from my experience the first click opens the dialog and if it opens away from the `custom` area then the second click will push the dialog window behind the app window which I believe is proper file dialog behavior.
MarnixCroes commented 2024-05-30 17:08:30 +00:00 (Migrated from github.com)

ok please ignore my previous comment about freezing.
This time I was running in full window, and the file dialog was opened in background without me noticing.
sry

ok please ignore my previous comment about freezing. This time I was running in full window, and the file dialog was opened in background without me noticing. sry
MarnixCroes (Migrated from github.com) approved these changes 2024-05-30 17:18:19 +00:00
MarnixCroes (Migrated from github.com) left a comment

tACK 7a8fb19db1 on Ubuntu desktop

the double-click issue can be fixed later imo

tACK 7a8fb19db1db138e50d7762aef2658737a3d6f8c on Ubuntu desktop the double-click issue can be fixed later imo
pablomartin4btc (Migrated from github.com) reviewed 2024-05-31 07:23:45 +00:00
pablomartin4btc (Migrated from github.com) left a comment

reACK 7a8fb19

Verified that the following issue has been fixed:

Another UX nit: when a user selects a custom datadir and accepts it, clicks again on custom datadir to open the file dialog, creates a different custom dir but cancels the dialog, it goes wrongly to tick/ check the default datadir. Perhaps we can correct that on a follow-up.

reACK 7a8fb19 Verified that the following issue has been fixed: > Another UX nit: when a user selects a custom datadir and accepts it, clicks again on custom datadir to open the file dialog, creates a different custom dir but cancels the dialog, it goes wrongly to tick/ check the default datadir. Perhaps we can correct that on a follow-up.
D33r-Gee commented 2024-05-31 16:11:59 +00:00 (Migrated from github.com)

Looks like the mac os artifact issue has been addressed... Could you please confirm on your end when you get the chance, @GBKS?

Looks like the mac os artifact issue has been addressed... Could you please confirm on your end when you get the chance, @GBKS?
GBKS commented 2024-06-07 08:05:22 +00:00 (Migrated from github.com)

ACK 7a8fb19. Looks and feels great, just tested again on MacOS.

Regarding the follow-ups in the description about double-clicking to save the path - why would users want to save the path in this specific situation?

ACK 7a8fb19. Looks and feels great, just tested again on MacOS. Regarding the follow-ups in the description about double-clicking to save the path - why would users want to save the path in this specific situation?
D33r-Gee commented 2024-06-07 15:17:47 +00:00 (Migrated from github.com)

Regarding the follow-ups in the description about double-clicking to save the path - why would users want to save the path in this specific situation?

It was an idea in case a user wants to quickly copy the datadir so they can either navigate to it in the cli or browse the folder using the OS gui

> Regarding the follow-ups in the description about double-clicking to save the path - why would users want to save the path in this specific situation? It was an idea in case a user wants to quickly copy the `datadir` so they can either navigate to it in the cli or browse the folder using the OS gui
GBKS commented 2024-06-08 10:11:01 +00:00 (Migrated from github.com)

It was an idea in case a user wants to quickly copy the datadir so they can either navigate to it in the cli or browse the folder using the OS gui

I like this thinking about secondary actions and I think we'll have a lot of opportunity to implement them throughout the app for more regular and power users (via tap-and-hold and right-click menus on mobile and desktop respectively). They are not always easy to discover, but repeat users should appreciate them.

> It was an idea in case a user wants to quickly copy the datadir so they can either navigate to it in the cli or browse the folder using the OS gui I like this thinking about secondary actions and I think we'll have a lot of opportunity to implement them throughout the app for more regular and power users (via tap-and-hold and right-click menus on mobile and desktop respectively). They are not always easy to discover, but repeat users should appreciate them.
Sign in to join this conversation.
No description provided.