Skip to content

#442: Custom Columns Prop (w/ Default Renderer & Dot Path Utility) #445

Open
ethanluc7 wants to merge 5 commits intomainfrom
442-custom-columns-prop
Open

#442: Custom Columns Prop (w/ Default Renderer & Dot Path Utility) #445
ethanluc7 wants to merge 5 commits intomainfrom
442-custom-columns-prop

Conversation

@ethanluc7
Copy link
Copy Markdown
Contributor

@ethanluc7 ethanluc7 commented Apr 21, 2026

Related to issue: #442

Summary

Adds custom column support to the schema table, allowing developers to extend tables with additional data columns via field metadata, and provides a default MetaValueRenderer component for display handling.

Description of Changes

  • Created CustomColumnConfig type requiring either a metaPath, a custom columnComponent, or both — with props (metaPath, value, field) passed to custom components
  • Integrated customColumns prop through DictionaryViewerPage → DictionaryTableViewer → SchemaTable → SchemaTableInit, generating TanStack column definitions for each config
  • Extracted getByDotPath utility to resolve dot-notation paths (e.g. meta.mappings.FHIR) against schema field objects
  • Created MetaValueRenderer component that accepts a single value of any type and renders it appropriately for table cells: strings as plain text (URLs as clickable links), numbers and booleans as their string representation, arrays as comma-separated lists, objects as compact key-value pairs with indented nesting, and null/undefined as empty cells
  • Wraps content in ReadMoreText for truncation with the existing "show more" pattern
  • Exported for use inside custom columnComponent implementations; used as the default renderer when only metaPath is provided

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
    • I have checked all updates to correct typos and misspellings
  • Formatting
    • Code follows the project style guide
    • Automated code formatters (ie. Prettier) have been run
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added
  • Documentation
    • All new environment variables added to .env.schema file and documented in the README
    • All changes to server HTTP endpoints have open-api documentation
    • All new functions exported from their module have TSDoc comment documentation

@ethanluc7 ethanluc7 requested a review from JamesTLopez April 21, 2026 13:30
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.

1 participant