feat(blog): add error boundary & simplify mermaid rendering#11
Merged
CagesThrottleUs merged 8 commits intomainfrom Dec 1, 2025
Merged
Conversation
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
…d styling Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
…ror display - Added a new error display section in BlogPostLayout for better user feedback on MDX syntax errors. - Introduced styling for error messages in BlogPostLayout.css. - Integrated BlogPostErrorBoundary for improved error management during content rendering. Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Signed-off-by: CagesThrottleUs <manstein.felix@gmail.com>
Add comprehensive test suites for previously untested components and update existing tests to align with recent refactoring changes. New test files created: - BlogPostErrorBoundary: error boundary rendering and lifecycle tests - CursorTracker: mouse event tracking and cleanup tests - ReadingProgress: scroll progress and visibility tests Updated existing test suites: - BlogService: remove localStorage caching tests after cache removal - BlogComponents: fix Mermaid tests for mermaid.live integration - BlogPostLayout: add error UI navigation and edge case coverage - BlogList: add edge cases for null index scenarios - useBlogPost: add detailed error message handling tests Test improvements: - Fix CursorTracker tests by using proper MouseEvent instances instead of fireEvent on window (fixes target.closest TypeError) - Update error boundary test to handle React's error formatting - Achieve 100% line coverage on hooks and most components - Overall coverage improved from 94.42% to 98.8% Signed-off-by: CagesThrottleUs <manstein.felix@gmail.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
This PR enhances the blog post rendering system by introducing comprehensive error handling through error boundaries and simplifying the Mermaid diagram integration by leveraging mermaid.live instead of client-side rendering.
Changes
Error Handling Improvements
BlogPostErrorBoundarycomponent: A new error boundary specifically designed for blog post rendering with styled error messages and recovery optionsBlogPostLayout: Integrated error boundary to catch and display rendering errors gracefully with detailed error informationuseBlogPosthook: Added error handling with descriptive messages and proper JSX import supportMermaid Integration Simplification
Blog Service Optimization
Dependency Management
Impact
Files Changed