SF-3880 Fix Lynx being automatically re-enabled after user turns it off - #4020
SF-3880 Fix Lynx being automatically re-enabled after user turns it off#4020Nateowami wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4020 +/- ##
=======================================
Coverage 81.04% 81.05%
=======================================
Files 659 659
Lines 42761 42766 +5
Branches 7020 6996 -24
=======================================
+ Hits 34657 34664 +7
+ Misses 6960 6958 -2
Partials 1144 1144 ☔ View full report in Codecov by Harness. |
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/editor/lynx/insights/lynx-insight-state.service.ts line 300 at r1 (raw file):
} op.set(puc => puc.lynxInsightState.panelData, panelData);
Ok, I see. So it seems that every time the project user config was loaded we wrote to the doc and overwriting the value for the enabled states. Interested that overwriting the enabled state with undefined would enable the assessments.
Code quote:
op.set(puc => puc.lynxInsightState.panelData, panelData);
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on RaymondLuong3).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/editor/lynx/insights/lynx-insight-state.service.ts line 300 at r1 (raw file):
Previously, RaymondLuong3 (Raymond Luong) wrote…
Ok, I see. So it seems that every time the project user config was loaded we wrote to the doc and overwriting the value for the enabled states. Interested that overwriting the enabled state with undefined would enable the assessments.
We were wiping out the user's personal settings. And since we default to having Lynx on if an admin enabled it for the project, not having a user-level setting means it defaulted to being on.
This change is