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

Improve UX for configuring Text type DB settings #1118

Closed
seancolsen opened this issue Mar 2, 2022 · 1 comment · Fixed by #1144
Closed

Improve UX for configuring Text type DB settings #1118

seancolsen opened this issue Mar 2, 2022 · 1 comment · Fixed by #1144
Assignees
Labels
affects: ux Related to user experience type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory

Comments

@seancolsen
Copy link
Contributor

Context

In #1080 we added support for the text type, but today @pavish @kgodey and I identified some behavior that requires UX adjustments. This ticket lays out more specific specs for the UI to configure database type for the Mathesar Text type.

Background

  • The following Postgres types all map to the "Text" Mathesar type. (Reference.)

    • (A) TEXT
    • (B) VARCHAR(#) (with a specific length set)
    • (C) VARCHAR (without a specific length set)
    • (D) CHAR(#) (with a specific length set)

Specs

For a column having a Mathesar Type of "Text"...

  • The UI can configure the postgres type to either be (A) or (B) -- but not (C) or (D).

  • For a new text column, the default configuration is (A).

  • For (A), the UI remains as it already is:

    image

  • For (B), the UI is:

    image

    After toggling "Restrict Field Size" to true, the default "Field Size Limit" is set to 255. "Field Size Limit" Is required -- if the user sets it to 0 or an empty value, the form is considered invalid and the save button is disabled.

  • If the column type has been configured outside of Mathesar to be (C), then the form will load as

    image

    This allows the user to transition the state from (C) to (A) or (B) by adjusting the form. It also allow the user to preserve the state as (C) by closing the form.

  • If the column has been configured outside of Mathesar to be (D) (a case we're expecting to be uncommon), then the UI will be:

    image

    Note that in this case the user will not be able to transition the column from (D) to (A) or (B). This column type is considered unsupported for now. We can display the data in it, and we can allow the user to edit the data, although there will be padding spaces in the data which is fine. But we don't need to provide a UI that allows the user to switch the column type to (A) or (B).

@seancolsen seancolsen added ready Ready for implementation type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory affects: ux Related to user experience labels Mar 2, 2022
@seancolsen seancolsen added this to the [07] Initial Data Types milestone Mar 2, 2022
@seancolsen
Copy link
Contributor Author

@ghislaineguerin you might like to look over this to make sure it's in-line with your expectations. @pavish and @kgodey and I discussed it today on an impromptu call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: ux Related to user experience type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants