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 work for viewing and deleting table constraints #328

Closed
kgodey opened this issue Jul 6, 2021 · 9 comments · Fixed by #760
Closed

Frontend work for viewing and deleting table constraints #328

kgodey opened this issue Jul 6, 2021 · 9 comments · Fixed by #760
Assignees
Labels
ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory

Comments

@kgodey
Copy link
Contributor

kgodey commented Jul 6, 2021

Problem

Users may want to view or delete table constraints.

Proposed solution

We should provide a way to do these actions from the UI following the "Working with Columns" design spec.

This covers:

  • Displaying table constraints of all types
  • Deleting table constraints of all types

Additional context

@kgodey kgodey added type: enhancement work: frontend Related to frontend code in the mathesar_ui directory needs: unblocking Blocked by other work labels Jul 6, 2021
@kgodey kgodey added this to the 07. Working with Tables milestone Jul 6, 2021
@kgodey kgodey added status: detail needed and removed needs: unblocking Blocked by other work labels Jul 20, 2021
@kgodey kgodey added needs: unblocking Blocked by other work and removed status: detail needed labels Jul 28, 2021
@kgodey kgodey added ready Ready for implementation and removed needs: unblocking Blocked by other work labels Aug 4, 2021
@kgodey kgodey changed the title Frontend work for working with table constraints Frontend work for viewing and deleting table constraints Aug 9, 2021
@raduab

This comment has been minimized.

@kgodey

This comment has been minimized.

@raduab

This comment has been minimized.

@kgodey

This comment has been minimized.

@raduab
Copy link

raduab commented Aug 20, 2021

@kgodey Were exactly should I add the "Table Actions" button?

The design prototype differs from the current implementation:

design_proposal

versus:

current_implementation

@kgodey
Copy link
Contributor Author

kgodey commented Aug 20, 2021

@raduab You can add it either before or after the Filters, Sort, Group fields, thanks for checking.

The design prototype and frontend are somewhat out of sync for a couple of reasons:

  • the designs are ahead of the frontend by a few features so they include things the frontend doesn't have yet (like adding records)
  • we also had to make some improvised decisions while implementing the frontend because the designs don't cover all states.

@raduab
Copy link

raduab commented Aug 20, 2021

@kgodey Thanks for clarifying this for me!

@seancolsen
Copy link
Contributor

seancolsen commented Oct 15, 2021

@pavish I'm picking up work on this issue and I have a question.

For reference, here's the spec:

image

As far as I can tell, we don't yet have a Svelte store that holds data about table constraints. I'm wondering if you want to express any opinions about where you'd like me to put the table constraints data within our store structure. The location that seems the most natural to me is to put it in Display (alongside Columns) -- but I'm not so confident in that choice.

On a somewhat related note, we need to decide when to fetch the table constraints data. For performance reasons, it would be nice to wait to fetch it until the user opens the "Table Constraints" modal. But it would simplify the code to fetch it at the beginning (like we do with the columns data). We might even decide to apply some styling based on table constraints, in which case fetching the constraints at the beginning would make sense. (It's not entirely clear to me just from looking at the spec, but we might need to apply a gray background to columns having a primary key table constraint, for example.) Do you have an opinion here?

@pavish
Copy link
Member

pavish commented Oct 18, 2021

@seancolsen Constraints are not only required for displaying the modal. We would have more places where we need them. Eg., We might require them to restrict entry into the table and show errors (eg., unique constrains), or when applying filters. We would also have to show separate indication for FKs on the column header. So it would be essential to fetch them at the start.

I think a dedicated store for constraints would be better, similar to Columns and Records.

Repository owner moved this from Ready to Done in [NO LONGER USED] Mathesar work tracker Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation 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