SF-3907 Fix note dialog being incorrectly closed - #4053
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4053 +/- ##
=======================================
Coverage 81.08% 81.09%
=======================================
Files 661 661
Lines 43061 43057 -4
Branches 7036 7033 -3
=======================================
- Hits 34917 34916 -1
+ Misses 6987 6980 -7
- Partials 1157 1161 +4 ☔ View full report in Codecov by Harness. |
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 4 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/xforge-common/dialog.service.spec.ts line 38 at r1 (raw file):
}); it('confirm passes disableClose through to the underlying dialog', async () => {
It does not look like this async is necessary
Code quote:
nderlying dialog', async () => {src/SIL.XForge.Scripture/ClientApp/src/xforge-common/dialog.service.spec.ts line 44 at r1 (raw file):
}); it('message passes disableClose through to the underlying dialog', async () => {
Same as above.
Code quote:
underlying dialog', async () => {af054ea to
aaf0521
Compare
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 2 comments.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on RaymondLuong3).
src/SIL.XForge.Scripture/ClientApp/src/xforge-common/dialog.service.spec.ts line 38 at r1 (raw file):
Previously, RaymondLuong3 (Raymond Luong) wrote…
It does not look like this async is necessary
Done.
src/SIL.XForge.Scripture/ClientApp/src/xforge-common/dialog.service.spec.ts line 44 at r1 (raw file):
Previously, RaymondLuong3 (Raymond Luong) wrote…
Same as above.
Done.
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 1 file and all commit messages, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Nateowami).
Supersedes #4045.
The bug was in the dialog service which in
openMatDialogwas not honoringdisableClosedwhen passed in the options, because it would override thedisableClosefrom the option with the positional argument.I've eliminated the positional argument, since I think passing a boolean is very unclear. Meanwhile passing
{ disableClose: true }is very clear what it means. Additionally, having two ways to set the same property naturally leads to situations where they might conflict, which is what was happening here.This change is