In order to query a database, the user must specify the server address to connect to, and, if it is a Cluster instance, they must enter their login credentials.
I believe TypeDB Cluster also requires some SSL configuration; due to its complexity, we can leave the full implementation of Cluster connection until later and just connect to TypeDB (Core) for now. However, I do think we should at least design the "Connect to TypeDB" page fully, even if the login button is disabled for now. This is to ensure that we have a suitable design for the Core section as well. I'm thinking TypeDB and TypeDB Cluster tabs are the right way to go here.
[x] On opening Studio, the "Connect to TypeDB" screen should be the first screen that comes up.
[x] It should include TypeDB and TypeDB Cluster tabs. Leave Cluster blank for now.
[x] The TypeDB tab should include an editable dropdown of server addresses, and a non-editable dropdown of database names. Next to the database name selector should be a [+] button to create a new one. At the bottom, we should have a single button: "Connect".
[x] On blur of the "server address" selector, attempt to create a Core client and list databases at that address.
[x] While retrieving databases, the "database" selector content should be replaced by "Loading databases..." and it should have no selectable options. If fetching databases succeeds, the selector should list each database as a selectable option.
[x] If there are no databases, the selector content should be replaced by "This server has no databases"
[x] If fetching databases fails, the server address dropdown should be highlighted in red, the database selector should read "Failed to load databases", and an error snackbar should show up. Editing the server address content in any way should clear these highlights.
[x] On clicking "Connect", we should navigate to the workspace screen, initialising a blank workspace for the selected database.
In order to query a database, the user must specify the server address to connect to, and, if it is a Cluster instance, they must enter their login credentials.
I believe TypeDB Cluster also requires some SSL configuration; due to its complexity, we can leave the full implementation of Cluster connection until later and just connect to TypeDB (Core) for now. However, I do think we should at least design the "Connect to TypeDB" page fully, even if the login button is disabled for now. This is to ensure that we have a suitable design for the Core section as well. I'm thinking TypeDB and TypeDB Cluster tabs are the right way to go here.