Add rich HTML table UI for sample query results#32
Merged
rdhyee merged 2 commits intoisamplesorg:mainfrom Oct 31, 2025
Merged
Conversation
Replace raw JSON output with styled, scrollable table featuring: **Features**: - Thumbnail images (clickable to full size) - Placeholder "No image" boxes for samples without thumbnails - Clickable sample PIDs linking to OpenContext records - Clickable site names linking to site pages - Formatted descriptions with proper line breaks - Geographic coordinates (lat/lon) - Zebra-striped rows for readability - Sticky header that stays visible while scrolling - Result count display **Layout**: - Max height: 600px with vertical scrolling - 5 columns: Thumbnail | Sample | Description | Site | Location - Responsive sizing with max-widths - Alternating row colors (#f8f9fa background) **Handles edge cases**: - Loading state: shows "Loading samples…" - Empty results: friendly message about Path 1 requirements - Missing thumbnails: grey placeholder box - Long descriptions: max-width with proper wrapping Significantly improves data exploration experience over raw JSON. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace raw JSON output with a beautiful, scrollable HTML table for Eric's query results.
Features
Visual Improvements
User Experience
Technical Details
overflow-y: autoBefore vs After
Before
{ "latitude": 34.990756602927, "longitude": 33.708768506146, "sample_site_label": "PKAP Survey Area", "sample_site_pid": "https://opencontext.org/subjects/48fd434c...", "sample_pid": "ark:/28722/k20g43t0z", "sample_label": "Batch 9", "sample_description": "Open Context published...", "sample_thumbnail_url": null, "has_thumbnail": false }After
A styled table with:
Edge Cases Handled
Changes
tutorials/parquet_cesium.qmd(line 897-980):Testing
Demo
Test with this geocode in the search box:
Should show 5 samples in the new table format.
🤖 Generated with Claude Code