Skip to content

SF-3734 Store the last selected project for the import draft wizard#3725

Merged
RaymondLuong3 merged 1 commit intomasterfrom
fix/SF-3734
Mar 3, 2026
Merged

SF-3734 Store the last selected project for the import draft wizard#3725
RaymondLuong3 merged 1 commit intomasterfrom
fix/SF-3734

Conversation

@pmachapman
Copy link
Collaborator

@pmachapman pmachapman commented Mar 3, 2026

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.


Open with Devin

This change is Reviewable

@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Mar 3, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.45%. Comparing base (1653881) to head (2523f49).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator Author

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLuong3 made 1 comment and resolved 1 discussion.
Reviewable status: :shipit: 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.

@RaymondLuong3
Copy link
Collaborator

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.

@RaymondLuong3 RaymondLuong3 merged commit 5132e3a into master Mar 3, 2026
24 checks passed
@RaymondLuong3 RaymondLuong3 deleted the fix/SF-3734 branch March 3, 2026 22:45
@RaymondLuong3 RaymondLuong3 removed the will require testing PR should not be merged until testers confirm testing is complete label Mar 3, 2026
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.

2 participants