[Bugfix:InstructorUI] Fix Rubric Rendering on Firefox#12063
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12063 +/- ##
=========================================
Coverage 21.71% 21.71%
Complexity 9584 9584
=========================================
Files 268 268
Lines 36571 36571
Branches 475 475
=========================================
Hits 7940 7940
Misses 28160 28160
Partials 471 471
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
How is 'preventing it from double rendering' different from forcing it to render once? Can you update the PR description to be more clear? |
Rkoester47
left a comment
There was a problem hiding this comment.
I was able to reproduce the issue in Firefox. After refreshing the page, the rubric would not appear beneath the text in the "Rubric" tab in the Edit Gradables page in Firefox. Furthermore, after refreshing the page, clicking between Yes/No on any rubric settings would cause an error to pop up in the browser.
I also added side by side photos of the issue (between Firefox and Chrome) to the PR description for clarity.
The changes in this PR seem to have fully resolved the issue. I tested in Firefox, Chrome and Edge and was able to see the rubric below the text on the rubric tab immediately. This is a crucial fix for users on Firefox and I believe it should be implemented into the code.
Why is this Change Important & Necessary?
When using the edit page on firefox, the rubric sometimes fails to render. This might be because
loadTemplates()is both called for the rubric and for rendering the redactions page. Fixing the double rendering fixes the issue.What is the New Behavior?
There are two solutions, one is to prevent it from double rendering, which can be inconsistent as firefox event loop issues keep popping up. The other solution, which is the new behavior, forces the rendering to only be once, making it more reliable in the future.
What steps should a reviewer take to reproduce or test the bug or new feature?
Load firefox before PR. Refresh constantly and watch rubric constantly break. Load firefox after PR, should not be breaking rubric.
Automated Testing & Documentation
Other information
Editing to add image of reported issue
Left is Firefox, right is Chrome.
