Closed edublancas closed 1 year ago
one important detail is the alias: if the dropdown is changed, we should only keep the alias if the user modified it. if it didn't, then we should change it for the default alias that corresponds to the selected db in the dropdown
Acceptance criteria:
somedb
and changes the DB selection, the previous fields input should be automatically stored in the session and relevant fields to be autopopulated.alias
and database
for DuckDB and SQLite.alias
field to be saved only if user changed it, else default value of selected connection to be displayed.edit connection
and create new connection
flow.Need some clarifications:
Create
button or user types some fields and then selects some other DB (without clicking Create
) and the expected behaviour is that the inputs should be retained?
Scenario 1: User selects Postgres, fills out username, alias, etc and hits the Create
button. creates another connection, Selects SQLite .. (should the previous inputs of postgres be auto-populated) ?
Scenario 2: User selects Postgres, fills out username, alias, etc and changes the dropdown to SQLite. the same values should be visible instead of form resetting. (I think this is the scenario you meant in the issue?)so the use case here is that a user might start editing connection details and then realize that they selected the wrong db. we want to prevent the issue of having to rewrite things from scratch.
if I fill out the form for a new connection:
and then switch the db from the dropdown, the form resets. it'll be better if it'd kept the values. note that some forms contain different fields (eg duckdb and sqlite only contain alias and database), so we should only fill out the ones that match