Skip to content

Display column comments in HTML tooltips - #51

Merged
JoseVelazcoH merged 3 commits into
developfrom
issue-8-column-comments
Aug 14, 2026
Merged

JoseVelazcoH merged 3 commits into
developfrom
issue-8-column-comments

Conversation

@zamax14

@zamax14 zamax14 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Preserves SQLAlchemy Column(comment=...) during introspection.
  • Includes column comments in the interactive HTML payload.
  • Applies comments as SVG text title attributes in the browser so users can inspect them on hover.

Tests

  • .venv/bin/python -m pytest tests/test_introspect.py tests/test_html_renderer.py
  • .venv/bin/python -m pytest

Documentation

  • TODO: documentation is intentionally deferred to a follow-up issue so these functional issue PRs do not conflict with each other while being reviewed.

@zamax14
zamax14 requested a review from JoseVelazcoH June 29, 2026 08:06
@zamax14 zamax14 self-assigned this Jun 29, 2026
@zamax14 zamax14 linked an issue Jun 29, 2026 that may be closed by this pull request
@zamax14
zamax14 marked this pull request as ready for review June 29, 2026 08:06
@zamax14
zamax14 marked this pull request as draft June 29, 2026 08:18
@zamax14
zamax14 marked this pull request as ready for review June 29, 2026 08:21
Comment on lines -368 to 375
}}, g);
}};
if (field.comment) {{
nameAttrs.title = field.comment;
kindAttrs.title = field.comment;
}}
el('text', nameAttrs, g);
el('text', kindAttrs, g);
}}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The column-comment tooltip doesn't work in the browser. The comment is assigned as title, and since el() does setAttribute('title', ...) on an SVG , it ends up as a title attribute. In SVG, the native tooltip is NOT produced by the title attribute it requires a child <title> element, so Chrome shows nothing on hover.

@zamax14
zamax14 requested a review from JoseVelazcoH July 30, 2026 18:00
@JoseVelazcoH
JoseVelazcoH merged commit 6695a0d into develop Aug 14, 2026
3 checks passed
@JoseVelazcoH
JoseVelazcoH deleted the issue-8-column-comments branch August 14, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display column comments in HTML tooltips

2 participants