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

Show DEFAULT in new record cells by default #1362

Closed
seancolsen opened this issue May 6, 2022 · 4 comments · Fixed by #1385
Closed

Show DEFAULT in new record cells by default #1362

seancolsen opened this issue May 6, 2022 · 4 comments · Fixed by #1385
Assignees
Labels
type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@seancolsen
Copy link
Contributor

"Limbo"

When adding a new record, there is a to which I'll refer as "limbo". The new record row is in limbo after it's been added to the UI but before it's been saved to the DB. Most times, the new record row only remains in limbo transiently, for a split second, while the request is loading. Any behavior of the row for such a short time is only of negligible concern. However, if there are errors adding a new row, the row may reach stasis in limbo, as described in #775 for example. In this prolonged limbo state, the UX becomes more important and currently has some shortcomings.

Current behavior in limbo

  • When a cell is poised to set the Postgres value to DEFAULT, it appears blank.

  • After the user edits the cell, the user has no way to revert the cell back to its DEFAULT state.

Desired behavior

  • All cells appear as DEFAULT by default.

  • DEFAULT is styled similarly to NULL.

  • Editing a cell, brings the value out of DEFAULT.

  • The user can return to DEFAULT using the context menu, in a similar fashion to NULL.

@seancolsen seancolsen added status: draft type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory labels May 6, 2022
@seancolsen seancolsen added this to the [08.1] 2022-05 improvements milestone May 6, 2022
@seancolsen
Copy link
Contributor Author

@pavish @ghislaineguerin @kgodey Does the above plan sound okay to you?

@ghislaineguerin
Copy link
Contributor

I think this makes a lot of sense. How is the default value set?

@kgodey
Copy link
Contributor

kgodey commented May 6, 2022

  • All cells appear as DEFAULT by default.

Instead of all cells, can we only show DEFAULT for cells that have a default value explicitly set? If so, this sounds fine.

@pavish
Copy link
Member

pavish commented May 6, 2022

It sounds good to me and I think it makes sense.

I'm not sure how well users would be able understand it at first look though, but it's better than having an empty cell.

@seancolsen seancolsen self-assigned this May 17, 2022
@kgodey kgodey modified the milestones: [08.1] 2022-05 improvements, High Priority Jun 1, 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.

4 participants