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 listing database views #455

Closed
Tracked by #442
kgodey opened this issue Jul 20, 2021 · 9 comments
Closed
Tracked by #442

Support for listing database views #455

kgodey opened this issue Jul 20, 2021 · 9 comments
Labels
type: enhancement New feature or request

Comments

@kgodey
Copy link
Contributor

kgodey commented Jul 20, 2021

Mathesar should support viewing a list of all existing views in a given schema.

Scenarios

  1. Users should be able to browse through a list of all available views in the currently open schema. This should probably happen in a different page with a paginated view.
    1. Error scenario: The list of views cannot be loaded from the backend due to an error.
  2. Users should be able to access all views through the left pane.
    1. Error scenario: The list of views cannot be loaded from the backend due to an error.
  3. Users should be able to search for views by name from the left pane, even if they are not visible in the left pane.
    1. Error scenario 1: The user tries to search for a view but no views are found with that name.
    2. Error scenario 2: The API call for the search fails for some reason (e.g. backend server is down)
  4. Users should be able to open a view in a tab. The design for what happens when a view is opened will be covered in Support for opening and interacting with a View #466.
    1. Error scenario: The user tries to open a view but the action fails for some reason (e.g. the view has been deleted by another user in the last few seconds)

Design Notes

  • Views are a new type of database object so we should consider how to present them to the user. Views are contained within a schema just like tables, but they are used for different purposes. It's highly likely that non-technical users will not understand the difference between tables and views easily, so this is something we need to emphasize in the design.
  • Please note that we cannot always show all views in the left pane. If there are hundreds of views, rendering all of them will make the product slow. We do not need a design solution here - Left pane UX improvements #723 will address how to show hundreds of views, but it's worth keeping in mind.
  • There are two different types of views - materialized views and regular views. They should have pretty similar functionality so I'm not sure if it's worth distinguishing them in the list of views, but it might be useful to have different icons or something like that.

Additional Context

@kgodey kgodey added restricted: design team ready Ready for implementation type: enhancement New feature or request labels Jul 20, 2021
@kgodey kgodey added this to the 08. Working with Views milestone Jul 20, 2021
@kgodey kgodey added pr-status: review A PR awaiting review status: draft and removed ready Ready for implementation pr-status: review A PR awaiting review labels Oct 12, 2021
@kgodey kgodey assigned kgodey and unassigned ghislaineguerin Oct 15, 2021
@kgodey kgodey changed the title Design for listing and search of views Support for listing database views Oct 30, 2021
@kgodey kgodey added ready Ready for implementation and removed status: draft labels Oct 30, 2021
@kgodey
Copy link
Contributor Author

kgodey commented Oct 30, 2021

@ghislaineguerin @pavish @mathemancer @seancolsen 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.

@kgodey kgodey added pr-status: review A PR awaiting review and removed ready Ready for implementation labels Oct 30, 2021
@kgodey kgodey self-assigned this Oct 30, 2021
@pavish
Copy link
Member

pavish commented Nov 1, 2021

  • Users should be able to browse through a list of all available views in the currently open schema. This should probably happen in a different page with a paginated view.

    I think instead of a new page for views of the open schema, we can add an option/link in the schemas listing page to list each schema's tables and views.

  • Views and tables exist on the same namespace in database i.e the name of the views and tables cannot be the same. This is a general point, just in case it helps @ghislaineguerin in the design process.

@pavish pavish removed their assignment Nov 1, 2021
@kgodey kgodey self-assigned this Nov 26, 2021
@kgodey kgodey added status: draft and removed ready Ready for implementation labels Nov 26, 2021
@kgodey
Copy link
Contributor Author

kgodey commented Nov 26, 2021

Assigning to myself in case the discussion around #834 ends up necessitating a separate section for materialized views.

@kgodey kgodey added ready Ready for implementation and removed status: draft labels Nov 29, 2021
@kgodey kgodey removed their assignment Nov 29, 2021
@ghislaineguerin ghislaineguerin self-assigned this Dec 3, 2021
@kgodey kgodey added status: started and removed ready Ready for implementation labels Dec 4, 2021
@ghislaineguerin ghislaineguerin added pr-status: review A PR awaiting review and removed status: started labels Dec 20, 2021
@ghislaineguerin
Copy link
Contributor

Assigned to Kriti to add additional implementation details.

@kgodey kgodey added ready Ready for implementation and removed pr-status: review A PR awaiting review labels Jan 12, 2022
@kgodey
Copy link
Contributor Author

kgodey commented Jan 26, 2022

I'm tracking creating implementation issues in #1027 so I'm closing this issue.

@kgodey kgodey closed this as completed Jan 26, 2022
@kgodey kgodey removed their assignment Jan 26, 2022
@kgodey kgodey added status: done and removed ready Ready for implementation work: product labels Jan 26, 2022
@kgodey kgodey removed this from the [09] Working with Views milestone Jun 1, 2022
@kgodey kgodey closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2024
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
Projects
No open projects
Development

No branches or pull requests

5 participants