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

Support for editing the structure of a database view #783

Closed
Tracked by #442
kgodey opened this issue Oct 30, 2021 · 6 comments
Closed
Tracked by #442

Support for editing the structure of a database view #783

kgodey opened this issue Oct 30, 2021 · 6 comments
Labels
needs: unblocking Blocked by other work type: enhancement New feature or request
Milestone

Comments

@kgodey
Copy link
Contributor

kgodey commented Oct 30, 2021

The Mathesar UI should allow users to edit the structure of an existing database view.

Scenario 1: The database view structure can be edited

  1. The user clicks on a button or menu that allows them to edit the structure of a view.
  2. We open the Data Explorer with pre-filled sections (see Design for visual query builder ("Data Explorer") #1065)
    1. There should be some indication that the data explorer was opened in response to a View editing request.
  3. The user can edit the View structure and either save the view or save as a new view.

Error scenarios

  • The user tries to remove a column that is a dependency for some other view or database object. The column cannot be removed.
  • The view update fails in the backend.

Scenario 2: The database view structure cannot be edited

There may be some views whose structure cannot be edited. We should convey this to the user somehow, either by hiding the option or disabling it.

Additional context

@kgodey kgodey added type: enhancement New feature or request status: draft restricted: maintainers Only maintainers can resolve this issue labels Oct 30, 2021
@kgodey kgodey added this to the [09] Working with Views milestone Oct 30, 2021
@kgodey kgodey self-assigned this Oct 30, 2021
@kgodey kgodey added pr-status: review A PR awaiting review and removed status: draft labels Nov 22, 2021
@kgodey
Copy link
Contributor Author

kgodey commented Nov 22, 2021

@dmos62 @ghislaineguerin @pavish @mathemancer @seancolsen @silentninja This issue has been updated and is ready for review. Please look through it and unassign yourself after you've added any feedback that you might have.

@seancolsen seancolsen removed their assignment Nov 22, 2021
@dmos62 dmos62 removed their assignment Nov 23, 2021
@ghislaineguerin
Copy link
Contributor

@kgodey How would we handle this for views where we cannot edit the structure or know what the dependencies are? I'm assuming this will be read-only or not accessible?

@pavish
Copy link
Member

pavish commented Nov 25, 2021

@kgodey
This is a technical concern. I know this was discussed, I just want to re-iterate that when the structure is modified and the view is saved, the backend should handle deleting the old view and creating the new one with the same id, name and dependencies. As far as the clients are considered, the same view gets updated.

@pavish pavish removed their assignment Nov 25, 2021
@mathemancer
Copy link
Contributor

My concerns from the view creation discussion still apply. Other than that, I have nothing to add for this issue.

@mathemancer mathemancer removed their assignment Nov 25, 2021
@kgodey
Copy link
Contributor Author

kgodey commented Nov 26, 2021

@kgodey How would we handle this for views where we cannot edit the structure or know what the dependencies are? I'm assuming this will be read-only or not accessible?

@ghislaineguerin Yes. I added an additional scenario for it above.

@kgodey This is a technical concern. I know this was discussed, I just want to re-iterate that when the structure is modified and the view is saved, the backend should handle deleting the old view and creating the new one with the same id, name and dependencies. As far as the clients are considered, the same view gets updated.

@pavish Yes, this is how it will be.

@silentninja silentninja removed their assignment Dec 1, 2021
@ghislaineguerin ghislaineguerin removed their assignment Dec 6, 2021
@kgodey kgodey added status: draft and removed pr-status: review A PR awaiting review labels Dec 8, 2021
@kgodey kgodey added needs: unblocking Blocked by other work and removed status: draft labels Mar 7, 2022
@kgodey kgodey removed their assignment Mar 7, 2022
@kgodey kgodey added work: design and removed work: product restricted: maintainers Only maintainers can resolve this issue labels Mar 7, 2022
@kgodey kgodey modified the milestones: [09] Working with Views, Unprioritized Jun 1, 2022
@kgodey
Copy link
Contributor Author

kgodey commented Jul 19, 2022

Although we are doing work related to this in Cycle 3, this ticket no longer covers accurate design requirements, so I'm going to close it.

@kgodey kgodey closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: unblocking Blocked by other work type: enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

7 participants