Hi team. Here is my QA of forms.
For the sake of follow-up discussion, I’m separating distinct points of critique by sections with snake_case titles.
(I think we should fix these before releasing forms, even if it means delaying the release.)
A long form “description” value causes layout overflow on the form builder page after the form has been saved. This makes the page unusable. The form’s Save button becomes off screen, making it hard for the user to recover the form. To fix this, we should remove the description from the top of the page since it already appears in two other places on the page.
Writing a long paragraph as a form “description” leads to content that does not render well on the form fill-out page. The line overflows the form container, truncating text with no way for the user to read all of it.
The tab order of fields when filling out the form is messed up, making it harder to fill out the form.
(The way the various pages fit together does not exactly match the behavior that I was expecting from Forms. I find it a bit confusing. There are a number of small points of critique I have on this topic, which are all somewhat related, so I’m grouping them together here. There’s a good deal of nuance to this topic too. So it could be a good one to revisit on a call.)
I was not expecting us to have a page for authenticated users to fill out a form. I was expecting this feature to be only for anonymous forms. I can certainly see forms are useful beyond anonymous users! But this extra use-case adds extra complexity and design considerations — especially concerning navigation.
If we have an authenticated form fill-out page, I would expect that the role used when submitting the form would the the collaborator’s configured role, not the form’s “associated role”. I think the form’s associated role should only be used for anonymous form fill-out. As such, I think the associated role should be part of the form’s “share” settings. If you don’t configure a public share link, then you don’t configure an associated role.
I’ll note that this behavior is potentially challenging to change later on, because it has the potential to break users’ workflows. So it would be good to make sure we’re considering this before the release.
Navigating the various forms pages currently feels awkward. The authenticated fill-out page is accessible from the schema page but not from the form builder, whereas the anonymous fill-out page is accessible from the form builder page but not from the schema page. I think we need better linking across many of the various pages.
Here’s a diagram. Solid lines represent current navigation paths. Dotted lines represent missing navigation paths that I think we need.
So I think we need to add ways for the user to navigate:
Given that we have an authenticated form fill-out page… and with some work to improve navigation from the authenticated fill-out page to the builder page, I think that internal links “to the form” could potentially point to the authenticated fill-out page (instead of the form-builder). For example, the links in in the nav menu — and perhaps even the form card links in the schema page — could go to the authenticated form fill-out page. Then the user could click an “Edit Form” button to go to the builder page. This would feel a bit more intuitive to me. And we could replace the “Edit Form” menu item on the form card with a hyperlink to the form builder page.
(These are things that I think we ought to try fixing before the release if possible.)
When a backend error is encountered during form submission (e.g. unique constraint violation) the error message (in the toast) displays as blank. We should display some text.
Form labels should be semantically tied to inputs. This way, clicking on the label focuses the input.
When a backend error prevents form submission, currently we display an error toast. I think we should display a (persistent) error box below the submission button instead.
I think we need some help content to explain what “Associated Role” is. This could be a hover question mark or a more persistent blue box.
On the fill-out page, it’s a little hard to visually understand the field nesting. I’d like to see some additional visual cuing here to make this clearer.
(These would be nice to do, and are also fairly easy.)
When creating a new form, it would be nice to auto-suggest a name for the form after the user has selected a table. I think using the name of the table would be best, so long as a form does not already exist with that name.
For FK columns, I think it would make more sense to title the form field using the column name instead of the name of the related table.
You seem to have logic which prevents columns from being added to the form if they have dynamic defaults
And you said (at 2:40):
The end user cannot actually fill values in columns that have dynamic defaults
But Mathesar does
allow the user to fill values into these columns. For example,
in the Service Milestones
table, if you make the notes
field NOT NULL and insert a record, then you can choose your own
value for the update_time
column whin the draft record row.
To me, a form is very similar to a draft record row. So I think we should allow users to manually add these columns to the form.
Perhaps we still don’t automatically add them though. I think it would be reasonable to say that any time a column has any default value (dynamic or static) then the column does not get automatically added to the form.
I don’t think the Mathesar logo should display within any of the authenticated forms pages
On the
anonymous form fill-out page, I think the logo should be smaller
and part of some text that says “This form was created with [logo]
“
There is some padding on the padding on the form builder page that I think looks weird. Instead, I think the area with the lighter background should behave the same as with the table page. Aside from a small gap, its left edge should extend all the way to the left edge of the viewport, and its right edge should extend all the way to the left edge of the inspector.
When a field is selected, I don’t think it should get the red background on hover.
When ia field is selected, the inputs for the label and help text do not have padding, border radius, or top/left/right borders. This style is inconsistent with other text inputs, and (to me) is somewhat aesthetically displeasing. I would be inclined to keep the standard padding on these inputs but shift their alignment to the left in order to obtain the desired text content alignment with the form input.
The form building behavior could use some minor improvement on narrow viewports. In particular, a selected required FK field has some UI that doesn’t wrap very nicely.
(These would take more work and aren’t pressing, so I don’t expect us to get to them soon)
When a field is nullable at the DB level but marked as required in the form, the validation is only implemented on the front end. This is bad because it’s still possible that empty values can end up being submitted. For example:
It would be nice to incorporate some way for the user to easily navigate from the table page to any forms built from the table, plus create a new form from the table.
Handling of dropped columns within the form definition is not great. There are a number of things we could improve in the form builder, form fill-out page, and form submissions process. Overall, this seems to need more thought, design, and implementation.
The UX of the form builder and fill-out page makes it awkward to handle the case where an optional FK is is marked “Must add new” but the referenced table contains a required field. It works okay when the user filling out the form wants to add the related record. But it’s impossible to fill out the form without adding the related record, even though the top-level FK field in the form is optional. The overall design does not allow for a top-level FK field being NULL without also giving the form fill-out user the option to select an existing record.