Database objects are defined objects in a database that store or reference data. In the context of Mathesar, two of those objects are listed and available to users as Tables
and Views
. Together, these objects are at the core of Mathesar’s user experience. A component of that experience is retrieving, listing, and identifying these objects and their types in different contexts.
With the introduction of Views
, the user interface needs to be updated to easily display and identify all database objects and types of an object.
Views
, like Tables
, have names that allow users to identify them or search for them. Icons that represent each are also used to differentiate each.
Initially, users will only be able to search views by name. However, relying on a name alone might not be sufficient to ensure a good user experience when trying to find views created a long time ago or by other users. We will consider more sophisticated search functionality in the future.
Clear Search
link displayed along with the results summary.The schema details page will be shown if a schema is open and there aren’t any tables selected. It will contain the schema’s name, the total number of tables and views, and additional sections that we can use to present the user with relevant information or links.
The detail page should also show a list of recently opened views or tables.
In the future additional content could be considered for this section, such as:
The schema explorer sidebar contains the entire list of objects for any schema available in Mathesar. The user can open any object from the sidebar by clicking on its navigation link. The sidebar also includes an input for searching through the listed objects.
Sidebar tabs will allow users to filter the sidebar’s contents to show only a particular object type. When set to ’ All ', the content will include both tables and views. Setting the tabs to Tables
will display only table objects, while Views
will display only view objects.
Regular views need to be differentiated from materialized views as the use cases might differ. However, we don’t want to create a rigid distinction between both as it could confuse users being introduced to the concept of views. For this purpose, an indicator, such as the letter ‘M’ should be added next to the view icon to show that it is of the type ‘Materialized’.
The method to generate a list of recently opened objects is still under discussion. Ideas like using local storage to provide that information have been considered. The idea is to provide users with a quick way to access their more recently used tables or views or continue their work.