Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6ca0a70
Remove section-level save on form field change
amadulhaxxani Jan 29, 2026
67367fc
Remove redundant save section dispatch test
amadulhaxxani Jan 29, 2026
f066005
fixing the scroll
amadulhaxxani Feb 4, 2026
2418bb4
Support hide/show for single-item array groups
amadulhaxxani Feb 9, 2026
8d722a0
Clean up imports and formatting in form code
amadulhaxxani Feb 9, 2026
656dd87
copilot suggestion for accessibility
amadulhaxxani Feb 10, 2026
2e8108b
Extract form group empty check to util
amadulhaxxani Feb 10, 2026
efe8b28
Copilot Suggestions: Make section form SSR-safe (use window service)
amadulhaxxani Feb 10, 2026
c680494
Copilot suggestion: Remove unused isSponsor and metadataKey vars
amadulhaxxani Feb 10, 2026
3ed13f6
Update section-form-operations.service.ts
amadulhaxxani Feb 10, 2026
64454da
Add tests for form array actions; clean error log
amadulhaxxani Feb 10, 2026
b7e38e6
Add empty-state cache; replace sponsor string
amadulhaxxani Feb 10, 2026
9838dbb
Remove @ts-ignore and add inline cast in map
amadulhaxxani Feb 10, 2026
98db3f0
Merge remote-tracking branch 'origin/clarin-v7' into 92-submission-fo…
amadulhaxxani Feb 10, 2026
8ac740f
Remove unused imports from form tests and section
amadulhaxxani Feb 10, 2026
7dea28b
Merge remote-tracking branch 'origin/clarin-v7' into 92-submission-fo…
kosarko Mar 4, 2026
5b99ce6
Use allowDeleteOnSingleItem and trigger save
amadulhaxxani Mar 6, 2026
c6766b4
Use fakeAsync/tick in CC license tests
amadulhaxxani Mar 6, 2026
b37f141
Merge branch 'clarin-v7' into 92-submission-form-changing-funding-to-…
amadulhaxxani May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,6 @@ describe('SubmissionSectionFormComponent test suite', () => {
comp.onChange(dynamicFormControlEvent);
fixture.detectChanges();

expect(submissionServiceStub.dispatchSaveSection).toHaveBeenCalled();

expect(comp.reinitializeForm).toHaveBeenCalled();
});
});
Expand Down
15 changes: 14 additions & 1 deletion src/app/submission/sections/form/section-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,20 @@ export class SubmissionSectionFormComponent extends SectionModelComponent {
* @param value
*/
dispatchFormSaveAndReinitialize(metadata, value) {
this.submissionService.dispatchSaveSection(this.submissionId, this.sectionData.id);
// NOTE: Section-level save (dispatchSaveSection) is intentionally NOT used here.
//
// Why section-level save is excluded from onChange:
// - SaveSubmissionSectionFormAction returns ALL sections data from backend (not just the target section)
// - parseSaveResponse() then dispatches UpdateSectionDataAction for every section
// - This cascades change detection across unrelated sections simultaneously (multiple detectChanges() calls)
// - In Firefox, this synchronized DOM update causes unexpected scroll jumps to License section
//
// Why it's safe to exclude:
// - Sponsor/Author metadata values are already persisted via:
// * Full form save on section blur (sections.directive.ts line 140)
// * SaveSubmissionFormAction covers all metadata when sections deactivate
// - Data integrity is guaranteed through established save flows
// - Section-level save on onChange is redundant and harmful for UX
this.reinitializeForm(metadata, value);
}

Expand Down
Loading