Kriti, Brent, Pavish, Ghislaine, and Mukesh,
After having a number of 1/1 conversations with each of you about the DB connections behavior and UI, I’ve made some progress on our next design iteration and have written the following specs that I’d like you each to review:
https://wiki.mathesar.org/design/specs/new-db-connection-form/
Please read and respond to this email thread with questions, concerns, proposed changes, or approval.
My specs doc goes into some important detail about the user-facing behavior when creating new database connections, but it does not address the manner in which users arrive at this form in the first place. Ghislaine is working on the design for the “Home page” which lists database connections and allows CRUD on them. She and I will work together to figure out how best to incorporate my “New Database Connection” form into her home page. We are considering various approaches including a modal, an inline form, and a separate page. Hammering down exactly how we want this “New Database Connection” form to behave (and thus, how big the form really needs to be) will no doubt help us envision the best way to integrate it into the rest of Mathesar.
For the sake of comparison, in Rajat’s PR this “New Database Connection” form is currently implemented as shown below. Consider this to be the starting point, from which we’re working to improve UX:
4. In certain installation types like the linux packages, the internal database is not a Postgres database, it could be a SQLite DB. I'm not certain about how far this is implemented (or if the decision was changed), this is what I remember from reading the Installation spec a while back. In this case, using the same Internal DB's Database server would not work.
To address the concerns that Pavish raised earlier within this thread, he and I had a call yesterday, and I also checked in with Brent briefly with some follow-up questions.
Now I’ve updated the spec with some small adjustments to language in order to resolve Pavish’s concerns.
Here’s a side-by-side comparison, highlighting the areas that I
changed:
(Pavish: you’ll notice that I went with the simpler of the options we discussed — help text instead of dynamic “disabled” status. This is because Brent and I decided it would not be worth spending the time now to forward permissions info to the front end.)
Notably, the “Create this database…” checkbox field now has help text underneath it to inform users about the extra permission required. In version A of the form (the simplest), we know the user name and so we put it in the help text dynamically. In version B, we omit it. And in version C we include it. This is most important in version C because the form concerns itself with two different postgres users — the “bootstrapping user” (as I’ll call it), and the “new user”. Brent made it clear to me that we actually want to create the database using the bootstrapping user, not the new user. For this reason, we want the help text to explicitly mention that user name.
I’ve updated the “New DB Connection” UI specs again in response to critique from Kriti and Brent.
At this point I’ll be moving forward with implementation. We can still modify the spec, but I’m assuming that any further concerns will be small. Don’t hesitate to raise more concerns, but please know that any concerns which substantially alter the structure of this form will incur additional costs now that implementation will shortly be underway.
Kriti, I made the small change you suggested to the help text. However, note that I wrote “PostgreSQL user” instead of “database user”. This is because we also decided to change the database name to “mathesar”, and I felt that using “database user” opened the potential for mis-reading the help text while skimming because it juxtaposed “mathesar” with “database”. This could be splitting hair though. Hopefully this is not a big deal. Help text is always easy to adjust later, including during PR review, so I’d like to move forward with this for now.
I made a number of small changes to the spec after talking with Brent. You can see a diff of my text changes here.
Here’s a visual diff of the changes I made to the mockups. If you read over the text diff above, the rationale for all these visual changes should hopefully be apparent. I welcome questions and critique, but please read the text diff first, as it explains a number of things.