hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
68 stars 44 forks source link

fixed the issued related to the editing big comment #9996

Open KaleemNeslit opened 19 hours ago

KaleemNeslit commented 19 hours ago

Link to Issue

Closes: #9960

Description of Changes

"How We Fixed It"

Inconsistent Delta Types: Large texts were causing deserializeDelta to return inconsistent types (strings vs. Delta objects) Rendering Instability: Inconsistent types would break the Quill editor State Management: Ensures smooth transitions between different content states. Solution Uses useMemo to memoize the deserialization process

Test Plan

Goto any community and write a comment with more than 2k characters and try to edit the comment

https://github.com/user-attachments/assets/d15a7aeb-7666-4ad8-ae05-a17fdc799a1e