Closed blurfx closed 2 weeks ago
The changes in this pull request primarily involve modifications to the package.json
, Preview.tsx
, and preview.css
files within the @codepair/frontend
project. The package.json
file has seen updates in dependencies, focusing on markdown processing libraries. The Preview.tsx
component has been restructured to utilize new libraries for rendering markdown, while the preview.css
file introduces styles for dark and light themes. These changes aim to enhance the functionality and visual presentation of markdown content.
File | Change Summary |
---|---|
frontend/package.json |
Removed @uiw/codemirror-themes ; added several markdown-related dependencies and type definitions. |
frontend/src/components/editor/Preview.tsx |
Refactored Preview component to use new markdown libraries and rendering methods; corrected unsubscribe logic. |
frontend/src/components/editor/preview.css |
Added comprehensive CSS styles for markdown preview, supporting dark and light themes with responsive design. |
Objective | Addressed | Explanation |
---|---|---|
Improve rendering performance during large document editing (393) | ❓ | It is unclear if the changes implement rendering optimization or incremental parsing as suggested. |
Preview.tsx
related to HTML content handling and markdown processing.MarkdownPreview
component, aligning with markdown rendering improvements.enhancement 🌟
In the garden of code, we hop and play,
With markdown magic, brightening the day.
New styles and functions, oh what a sight,
Rendering dreams in dark and light!
So let's cheer for the changes, both bold and bright,
For a smoother preview, our hearts take flight! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
What this PR does / why we need it:
Apply incremental DOM update to re-render only the DOM of the parts that have changed, rather than re-rendering all.
Which issue(s) this PR fixes:
Fixes #393
Special notes for your reviewer:
This PR only cares about the performance of DOM updates in markdown rendering process. I think incremental parsing is a more complicated problem, so it would be nice to have a separate discussion on that later.
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Style