Implement generic waveform visualization system with proper basePath handling#9
Conversation
Co-authored-by: joelmartinez <90380+joelmartinez@users.noreply.github.com>
Co-authored-by: joelmartinez <90380+joelmartinez@users.noreply.github.com>
joelmartinez
left a comment
There was a problem hiding this comment.
@copilot in addition to addressing the comments I left on the PR, when you move the visualizer initialization to the siteframe ... there shouldn't need to be an explicit definition of the items to be visualized. Add a class or something that you can use a selector to just pick however many canvases are in any given piece of documentation, and iterate over those to initialize them.
…handling Co-authored-by: joelmartinez <90380+joelmartinez@users.noreply.github.com>
Implemented in commit 7f1bca9. The visualizer initialization is now in SiteFrame.cshtml using a CSS class selector ( |
…lass and data attributes Co-authored-by: joelmartinez <90380+joelmartinez@users.noreply.github.com>
This PR refactors the waveform visualization system to be more maintainable and properly handle different deployment scenarios with basePath configurations.
Changes Made
Generic Canvas Initialization
waveform-visualizationCSS class to all canvas elements withdata-sampleattributesSiteFrame.cshtmlthat automatically discovers and initializes all visualization canvases usingquerySelectorProper basePath Support
SiteFrame.cshtmltemplate@Asset()helper to properly handle basePath configuration fromSiteConfig.ymlNavigation Updates
Benefits
The system now automatically detects any canvas with the
waveform-visualizationclass and initializes it with the appropriate sample data based on thedata-sampleattribute.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.