You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since a lot of the tables in a django-sql-dashboard ultimately come from Django models, I thought it would be helpful if the dashboard automatically surfaced the help_text for model fields, and perhaps even the docstring for models themselves, when applicable. This way someone new to the database schema could easily be onboarded.
One easy way to do this without disrupting the current design would be to just add a title attribute to column names that's set to the help_text of the relevant column. However, this would only surface on devices with mice, and wouldn't be accessible to keyboard-only users or screen readers. A more accessible alternative might be to add an information widget (perhaps the unicode character ℹ or an icon of an "i" with a circle around it) that displayed the tooltip on click or enter/space keypress.
The text was updated successfully, but these errors were encountered:
I've been thinking about ways of adding optional extra metadata to tables and columns - maybe with some kind of YAML configuration - but I have to admit I hadn't thought to use the existing Django metadata for that!
An interesting opportunity here is that PostgreSQL gives us enough information in cursor.description to tell which table and column the results in an arbitrary query came from - so no matter the query, if a column comes from a specific table we can add extra contextual information to it.
Since a lot of the tables in a django-sql-dashboard ultimately come from Django models, I thought it would be helpful if the dashboard automatically surfaced the
help_text
for model fields, and perhaps even the docstring for models themselves, when applicable. This way someone new to the database schema could easily be onboarded.One easy way to do this without disrupting the current design would be to just add a
title
attribute to column names that's set to thehelp_text
of the relevant column. However, this would only surface on devices with mice, and wouldn't be accessible to keyboard-only users or screen readers. A more accessible alternative might be to add an information widget (perhaps the unicode character ℹ or an icon of an "i" with a circle around it) that displayed the tooltip on click or enter/space keypress.The text was updated successfully, but these errors were encountered: