Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set network in launcher #1098

Merged

Conversation

edouardparis
Copy link
Member

@edouardparis edouardparis commented May 29, 2024

This Pull requests introduce three changes:

  1. Network can only be chosen with the launcher panel. A drop down showing what network user can install is shown to the user when clicking on install a new network.
  2. A previous button is added to the first installer page, so user can be redirected to launcher and the network choices if he has chosen the wrong network. close GUI installer: add a previous button #306
  3. In order to make it clear for the user which network he is actually using or he is currently installing a blue banner is added on top of the window if the network is different than the bitcoin mainnet.

20240529_13h01m15s_grim
20240529_13h01m27s_grim
20240529_13h01m02s_grim
20240529_13h00m35s_grim

@darosior
Copy link
Member

darosior commented May 29, 2024

Here:
image

nit: i think it would be clearer if the two sections were:

  • Open an existing wallet
  • Create a new wallet

It's already obvious from the options the user has to select a network. I think it's more helpful to tell the user what the selection would achieve.

Also, the buttons are not all of the same size.

@jp1ac4
Copy link
Collaborator

jp1ac4 commented May 29, 2024

It looks very nice 😍

After deleting an existing wallet, the list of networks for a new install does not refresh to include the deleted network.

It would be nice to refresh this list even while the modal is open:
image

Regarding the "Change network" button, this is also covered as part of #993. There are some other special cases to consider, e.g. if the network has been specified in the command line, it may not make sense to show the button.

The only other thing I found is that the default window size may make the list not display nicely, e.g.
image

This is resolved if the window is made bigger.

@darosior
Copy link
Member

This is the screen i get on the first launch on a fresh datadir:
image

We shouldn't tell "Welcome back". Only "Welcome" works i guess?

We should not have the "Select network" section, since there is no existing wallet. We should have the "Install on mainnet" by default, with a small line inviting to install on another network (by selecting which one from a dropdown). As per the mockups:
image

Also had the same issue as Michael above:
image

In addition, again "Select network" should not be there if there is no installed wallet.

@nondiremanuel
Copy link
Collaborator

I would propose adding a back symbol ("<" or something equivalent) in the "Change Network" button to indicate that, by clicking it, the user would be redirected to the previous step.

@edouardparis edouardparis force-pushed the set-network-in-launcher branch from a95bb03 to 8ffed27 Compare May 29, 2024 14:12
@edouardparis edouardparis requested review from jp1ac4 and darosior May 29, 2024 14:25
@jp1ac4
Copy link
Collaborator

jp1ac4 commented May 29, 2024

Deletion of existing wallet works nicely now and the list of networks is displaying well on the default window size.

I found that if I use a new data directory, I get an error in the logs when selecting the network to use:

ERROR liana_gui::logger: Failed to change logger settings: Io(
    Os {
        code: 2,
        kind: NotFound,
        message: "No such file or directory",
    },
)

and then after completing the installer:

ERROR liana_gui::logger:102: Failed to remove installer log file /home/michael/test/liana/gui/abcdef/installer.log error:Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}

@darosior
Copy link
Member

Sorry for nitpicking, but now it's not very clear what's happening.
image

Could this read "Install Liana on Bitcoin mainnet"? Or better yet not mention mainnet at all, some would not know what "mainnet" is (i can already see from here the question "is that a shitcoin?").

Ideally i think we would have something like a button which reads something like "Create a Liana wallet" with like a right-facing arrow. And then below, in a smaller font, some text which reads "Select a different network". Clicking on this text would expand the list of networks. Selecting one of the network would collapse the list and change the Bitcoin logo in the main "Create a Liana wallet" button. What do you think? Am i making sense?

Alternatively, we can try going for something simpler which wouldn't have you re-implement multiple components. But i'm not sure what. Right now it's very confusing. The user can't understand what clicking on the button is going to achieve for them.

@edouardparis
Copy link
Member Author

Ideally i think we would have something like a button which reads something like "Create a Liana wallet" with like a right-facing arrow. And then below, in a smaller font, some text which reads "Select a different network". Clicking on this text would expand the list of networks. Selecting one of the network would collapse the list and change the Bitcoin logo in the main "Create a Liana wallet" button. What do you think? Am i making sense?

Only in the case of it is a fresh install and no other wallet is created ?
I think it adds one useless clicks, once the list of network is expanded, user should just click on it to start the install.

@darosior
Copy link
Member

darosior commented May 29, 2024

Maybe. Do you have another suggestion? I don't think users should see "mainnet". And they should know what clicking on the button is going to do.

I'm also trying to think through an alternative which would be less time consuming to implement. Do you have an idea? Maybe just a label before the "Bitcoin mainnet" button which reads "Create a new Liana wallet:"? This is ugly, we keep the "mainnet" wording, but it's simple.

Launcher is not skipped anymore if no datadir exists
the code in main.rs line 138 to create the datadir
needs to be duplicated in this case.
@edouardparis edouardparis force-pushed the set-network-in-launcher branch from e7061ba to 977d8fa Compare May 30, 2024 08:30
Copy link
Collaborator

@jp1ac4 jp1ac4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK c0e7b63.

@edouardparis edouardparis merged commit c4c32d2 into wizardsardine:master May 30, 2024
21 checks passed
@edouardparis edouardparis deleted the set-network-in-launcher branch May 30, 2024 09:50
@nondiremanuel nondiremanuel added this to the Liana v6 milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

Successfully merging this pull request may close these issues.

GUI installer: add a previous button
4 participants