Conversation
- changed the normalization logic to reduce code complexity. - improves readability and maintainability of the function.
- add cache manager for efficient waveform rendering - introduce debug system for performance tracking and logging - enhance event handling with resize and seek functionalities - update types for better structure and clarity
… functions - Implemented unit tests for the RenderingEngine class covering constructor, custom renderer, hooks, and rendering logic. - Added tests for canvas utility functions including bar and line dimension calculations, progress line drawing, canvas resizing, and context setup. - Created tests for peaks utility functions to validate peak extraction, normalization, and progress clamping. - Introduced vitest configuration for testing environment setup and coverage reporting. - Updated tsdown configuration to specify output name for the library.
- Configure demo page to use built library instead of source code - Add Vite configuration for demo page build - Update package.json exports and build setup - Add Tailwind CSS and analytics dependencies for demo - Export DEFAULT_OPTIONS for demo usage This enables testing the production build behavior and ensures demo accurately reflects the library's published state.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Add packages permission to fix missing packages field error - Update linter step to use oxlint instead of ESLint - Add test step to run vitest tests - Update step descriptions for clarity
- Add packages field pointing to current directory - This fixes the 'packages field missing or empty' error in CI
- Add build:webpage script that builds library before webpage - Create vercel.json with proper build configuration - This ensures dist directory exists before webpage build
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
This PR introduces a comprehensive architecture refactoring that modularizes the waveform renderer library while maintaining full API compatibility. The changes focus on performance optimization, better maintainability, and enhanced developer experience.
🏗️ Architecture Changes
Development tooling migration:
New modular architecture:
cache-manager.ts): Efficient waveform rendering management with intelligent invalidation strategiesdebug-system.ts): Advanced performance tracking and logging for system monitoringrendering-engine.ts): Separation of rendering logic from main component for better maintainabilityevent-handler.ts): Centralized handling of resize and seek events✨ Functional Improvements
Performance optimizations:
Improved type structure:
types/types.tsfor better clarityDEFAULT_OPTIONSfor external usage🧪 Testing Coverage
Comprehensive test suite added:
RenderingEngine,CacheManager,DebugSystem🔧 Demo Configuration
Enhanced demo page:
📦 Dependency Management
Stats: 32 files changed, +5,648 additions, -2,231 deletions
These changes maintain complete compatibility with the existing API while providing a more solid and modular foundation for future library development.