openedx / frontend-app-discussions

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

feat: restricted unnecessary api calls #683

Closed sundasnoreen12 closed 3 months ago

sundasnoreen12 commented 3 months ago

INF-1295

Description

Need following Improvements for the "Content Unavailable" Screen in the Discussion MFE and In-Context Sidebar.

A.C

  1. Optimized API calls by restricted unnecessary parallel requests, only invoking the API returning the isEnroll attribute when needed, and prevented additional calls.
  2. Ensured that unavailable content within the in-context sidebar remains hidden across all use cases.

Merge Checklist

Post-merge Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.83%. Comparing base (4914f51) to head (ccd3b96).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #683 +/- ## ======================================= Coverage 92.82% 92.83% ======================================= Files 158 158 Lines 3304 3307 +3 Branches 896 899 +3 ======================================= + Hits 3067 3070 +3 Misses 218 218 Partials 19 19 ```

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