openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 63 forks source link

feat: added draft functionality for comment and responses #727

Closed sundasnoreen12 closed 2 months ago

sundasnoreen12 commented 3 months ago

INF-1444

Description

Learners using the discussion board have faced a frustrating issue: losing their work when switching tabs and returning to the post. This can be especially disheartening for those writing lengthy comments or responses. The issue occurs specifically while writing comments or responses on posts.

Solution

Draft Feature: Offering a draft functionality where users can save unfinished posts and return to them later. The draft only be saved on the frontend and are lost on page reload.

Screenshots/sandbox (optional):

https://www.loom.com/share/fa0007a967ea406f89835409009dd3b1?sid=72cdf8c3-2e9f-4816-ba62-d7b991b5872b

Merge Checklist

Post-merge Checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 97.01493% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.16%. Comparing base (422fbf6) to head (13a8a17).

Files Patch % Lines
src/discussions/post-comments/data/hooks.js 97.29% 1 Missing :warning:
src/discussions/utils.js 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #727 +/- ## ========================================== + Coverage 92.88% 93.16% +0.28% ========================================== Files 160 160 Lines 3329 3396 +67 Branches 888 917 +29 ========================================== + Hits 3092 3164 +72 + Misses 219 214 -5 Partials 18 18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.