Skip to content

Conversation

@h-mayorquin
Copy link
Contributor

@h-mayorquin h-mayorquin commented Jan 2, 2026

Previously, there was no way to view column descriptions in the HTML display of DynamicTables. I think this will be useful to add. When working on conversion projects I use the HTML to check that everthing is as intended. In addition, this feature will be useful for people reading new NWBFiles through the notebok (e.g. from Dandi) as it improves the representation of common but important tables such as trials, electrodes, and units. This is especially important for custom-added columns, where most columns are hard to interpret without a description.

For the implementation, a new collapsible "columns" section is added to the generate_html_repr() method in DynamicTable. Each column is displayed as an individually collapsible item (collapsed by default) that shows the column's description when expanded. Column names include an access code tooltip (e.g., ['column_name']) that can be clicked to copy to clipboard, consistent with other field displays in the HTML representation.

This is how it looks:

image

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Does the PR clearly describe the problem and the solution?
  • Have you reviewed our Contributing Guide?
  • Does the PR use "Fix #XXX" notation to tell GitHub to close the relevant issue numbered XXX when the PR is merged?

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.44%. Comparing base (a06614b) to head (e7a7aa4).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
src/hdmf/common/table.py 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1369      +/-   ##
==========================================
- Coverage   92.44%   92.44%   -0.01%     
==========================================
  Files          42       42              
  Lines        9747     9762      +15     
  Branches     1979     1982       +3     
==========================================
+ Hits         9011     9024      +13     
- Misses        462      463       +1     
- Partials      274      275       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rly
Copy link
Contributor

rly commented Jan 2, 2026

Great idea. Thanks @h-mayorquin !

@rly rly merged commit a21f308 into hdmf-dev:dev Jan 2, 2026
27 checks passed
@h-mayorquin h-mayorquin deleted the add_column_description_to_dynamic_table branch January 3, 2026 13:32
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.

2 participants