Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AU-2174): Fix left sidebar throwing 404 #1556

Merged
merged 1 commit into from
Dec 20, 2024
Merged

fix(AU-2174): Fix left sidebar throwing 404 #1556

merged 1 commit into from
Dec 20, 2024

Conversation

Rodra
Copy link
Contributor

@Rodra Rodra commented Dec 18, 2024

https://2u-internal.atlassian.net/browse/AU-2174
#1437

Issue:

useCourseOutlineSidebar hook needs to use the NewSidebarContext if isNewDiscussionSidebarViewEnabled is true. At the time we set the SidebarProvider in the Course file we use the old side bar (SidebarProvider) or the new one (NewSidebarProvider) depending on the isNewDiscussionSidebarViewEnabled value. We are not taking that into account when calling useContext in the mentioned hook, so all values returned from it are undefined since we try to get values from a provider that was not set previously.

New Discussion Sidebar enabled and New Left Sidebar enabled
Result: Error

New Discussion Sidebar enabled and New Left Sidebar disabled
Result: No error

New Discussion Sidebar disabled and New Left Sidebar enabled
Result: No error

New Discussion Sidebar disabled and New Left Sidebar disabled
Result: No error

Fix:

Depending on isNewDiscussionSidebarViewEnabled use SidebarContext or NewSidebarContext inside of useCourseOutlineSidebar hook.

https://www.loom.com/share/901c05d5dc024d9da4d07da020701213?sid=cce15834-2aeb-4ed6-8225-dedbf24e4137

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.82%. Comparing base (3811f5f) to head (eceddfc).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1556   +/-   ##
=======================================
  Coverage   89.82%   89.82%           
=======================================
  Files         326      326           
  Lines        5601     5604    +3     
  Branches     1396     1397    +1     
=======================================
+ Hits         5031     5034    +3     
+ Misses        555      554    -1     
- Partials       15       16    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KristinAoki KristinAoki linked an issue Dec 19, 2024 that may be closed by this pull request
@Rodra Rodra merged commit cbe5b28 into master Dec 20, 2024
7 checks passed
@Rodra Rodra deleted the fix/AU-2174 branch December 20, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Left sidebar navigation breaks rendering of course
2 participants