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 of Date & Time Mathesar types #260

Closed
1 task done
Tracked by #250
kgodey opened this issue Jun 14, 2021 · 2 comments · Fixed by #1405
Closed
1 task done
Tracked by #250

Frontend implementation of Date & Time Mathesar types #260

kgodey opened this issue Jun 14, 2021 · 2 comments · Fixed by #1405
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 Date & Time Mathesar typeww
  • change data type to and from the associated DB types based on options selected
    • DATE
    • TIME WITH TIME ZONE
    • TIME WITHOUT TIME ZONE
    • TIMESTAMP WITH TIME ZONE
    • TIMESTAMP WITHOUT TIME ZONE
  • view, set, and change data type options related to the Date & Time data types
  • filter data by Date & Time-specific filtering options
  • group data by Date & Time-specific grouping options
  • use display options to view data in Date & Time type columns
  • use a date and time picker while entering new data into columns or filters

Update:

DB Type Mapping

  • The Date UI type maps to the DATE DB type.
  • The Time UI type maps to the TIME WITHOUT TIME ZONE DB type by default. "Support Time Zones" should be FALSE.
    • This applies to new columns and converting existing columns to Time
    • Turning on "Support Time Zones" should convert the type to TIME WITH TIME ZONE
    • If the DB type happens to be TIME WITH TIME ZONE, "Support Time Zones" should be checked and turning it off should convert it to TIME WITHOUT TIME ZONE.
  • The same logic applies to Date & Time, except that the default is TIMESTAMP WITH TIME ZONE.

Implementation

Design

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 of date and time data types. Frontend implementation of Date & Time Mathesar type Sep 13, 2021
@kgodey kgodey added needs: unblocking Blocked by other work and removed status: draft labels Sep 13, 2021
@kgodey kgodey changed the title Frontend implementation of Date & Time Mathesar type Frontend implementation of Date & Time Mathesar types Mar 1, 2022
@kgodey kgodey added ready Ready for implementation and removed needs: unblocking Blocked by other work labels Mar 1, 2022
@kgodey
Copy link
Contributor Author

kgodey commented Mar 1, 2022

Marking this as ready since filtering and grouping have been moved to other issues and remaining backend work is done.

Actually, this is still blocked by #960

@kgodey kgodey added needs: unblocking Blocked by other work ready Ready for implementation and removed ready Ready for implementation needs: unblocking Blocked by other work labels Mar 1, 2022
@kgodey
Copy link
Contributor Author

kgodey commented Mar 8, 2022

Backend work is merged, so removing blocked label.

@pavish pavish self-assigned this May 2, 2022
@pavish pavish added status: started and removed ready Ready for implementation labels May 6, 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