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

Frontend implementation for Boolean Mathesar type #257

Closed
Tracked by #247
kgodey opened this issue Jun 14, 2021 · 0 comments · Fixed by #1279
Closed
Tracked by #247

Frontend implementation for Boolean Mathesar type #257

kgodey opened this issue Jun 14, 2021 · 0 comments · Fixed by #1279
Assignees
Labels
type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory

Comments

@kgodey
Copy link
Contributor

kgodey commented Jun 14, 2021

Requirements

Users should be able to:

  • view data in columns that have the Boolean Mathesar type
  • change data type to and from the BOOLEAN DB type
  • view, set, and change data type options related to the Boolean data type
  • filter data by Boolean-specific filtering options
  • use display options to view data in Boolean type columns
    • The checkbox display option should display data as checkboxes
    • The dropdown display option should display data as dropdowns and only allow boolean options to be input
    • If custom labels are selected, the labels for the dropdowns should be adjusted accordingly.

Update:

DB Type Mapping

There is only one DB type mapping to this UI type, so no special mapping rules are necessary.

Implementation

Design

  • The Global Data Types spec has the latest version of the UX.
  • The Boolean Data Type spec has an older version of the UX but more information on user scenarios.
  • The NULL values spec has requirements for displaying and editing NULL values within checkbox columns. (See "Scenario 1c" and "Scenario 2c".)

Backend

  • /api/v0/tables/ lists the name and DB type of each columns
  • /api/v0/tables/<id/columns/ lists column information in more detail
  • /api/v0/databases/<id>/types/ maps Mathesar types to DB types and provides a list of filtering and grouping options per-type.
    • These should be used to populate the filter and grouping options dynamically.
  • Updates to column types and type options should happen via PATCH requests to /api/v0/tables/<id>/columns/<id>/. These updates include
    • Changes to the data type (type)
    • Changes to the display options (display_options)

Additional Context

@kgodey kgodey added type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory needs: unblocking Blocked by other work status: detail needed labels Jun 14, 2021
@kgodey kgodey added this to the 8. Initial Data Types milestone Jun 14, 2021
@kgodey kgodey removed the needs: unblocking Blocked by other work label Jun 18, 2021
@kgodey kgodey changed the title Frontend implementation for boolean data type Frontend implementation for Boolean Mathesar type Sep 13, 2021
@kgodey kgodey added needs: unblocking Blocked by other work and removed status: draft labels Sep 13, 2021
@pavish pavish self-assigned this Feb 7, 2022
@pavish pavish added ready Ready for implementation and removed needs: unblocking Blocked by other work labels Feb 15, 2022
@pavish pavish added status: started and removed ready Ready for implementation labels Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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