SF-3734 Store the last selected project for the import draft wizard#3725
SF-3734 Store the last selected project for the import draft wizard#3725RaymondLuong3 merged 1 commit intomasterfrom
Conversation
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-import-wizard/draft-import-wizard.component.ts line 432 at r2 (raw file):
// Store the selected project await this.projectUserConfigDoc?.submitJson0Op(op => op.set(puc => puc.selectedDraftTargetParatextId, paratextId));
It makes more sense to me if this was done in startImport(). In this method, we only know that the users selected a project. Also, do you think we should have a test for this?
Code quote:
// Store the selected project
await this.projectUserConfigDoc?.submitJson0Op(op => op.set(puc => puc.selectedDraftTargetParatextId, paratextId));
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3725 +/- ##
=======================================
Coverage 81.44% 81.45%
=======================================
Files 620 620
Lines 38954 38960 +6
Branches 6360 6355 -5
=======================================
+ Hits 31728 31734 +6
+ Misses 6256 6243 -13
- Partials 970 983 +13 ☔ View full report in Codecov by Sentry. |
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on RaymondLuong3).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-import-wizard/draft-import-wizard.component.ts line 432 at r2 (raw file):
It makes more sense to me if this was done in startImport(). In this method, we only know that the users selected a project.
I talked with Nathaniel and it is better to keep it on selection, as the user can close the dialog, so it will not lose their selection.
Also, do you think we should have a test for this?
We can if you like? I didn't write a specific test as it is code that is relying on what other components (realtime server, project select), than any real logic in this component.
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 made 1 comment and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-import-wizard/draft-import-wizard.component.ts line 432 at r2 (raw file):
Previously, pmachapman (Peter Chapman) wrote…
It makes more sense to me if this was done in startImport(). In this method, we only know that the users selected a project.
I talked with Nathaniel and it is better to keep it on selection, as the user can close the dialog, so it will not lose their selection.
Also, do you think we should have a test for this?
We can if you like? I didn't write a specific test as it is code that is relying on what other components (realtime server, project select), than any real logic in this component.
Ok, that makes sense that the selection is saved and it won't be lost if a user closes the dialog. Sounds good.
|
I am going to merge this. I don't see a reason we need to get testers to confirm this since I can easily see it in my testing. |
This PR stores the last project selected in the import draft wizard to the user project config. This is saved when a user selects a project in the wizard.
This change is