Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

candidate_parameters: replace $.ajax with lorisFetch#10334

Open
Montekkundan wants to merge 4 commits intoaces:main from
Montekkundan:montek/issue-4213-candidate-parameters-fetch
Open

candidate_parameters: replace $.ajax with lorisFetch #10334
Montekkundan wants to merge 4 commits intoaces:main from
Montekkundan:montek/issue-4213-candidate-parameters-fetch

Conversation

@Montekkundan
Copy link

@Montekkundan Montekkundan commented Feb 5, 2026

Summary

Replace $.ajax calls with lorisFetch in candidate_parameters.

Why

This removes jQuery AJAX usage in this module for issue #4213.

Scope

Only AJAX replacement in this module. No unrelated jQuery refactors.

Dependency

Depends on #10333 .

Verification

git grep '\$\.ajax' is clean for touched files.

@github-actions github-actions bot added Language: Javascript PR or issue that update Javascript code Module: candidate_parameters PR or issue related to candidate_parameters module labels Feb 5, 2026
@driusan driusan added the State: Blocked PR or issue awaiting an external event such as the merge or another PR to proceed label Feb 5, 2026
Copy link
Author

Follow-up pushed to align with #9999 Client guidance.

Updated

  • Added module client: modules/candidate_parameters/jsx/CandidateParametersClient.js
  • Migrated JSON/data operations in:
    • CandidateInfo.js
    • ConsentStatus.js
    • FamilyInfo.js
    • ParticipantStatus.js
    • ProbandInfo.js

Notes

  • JSON fetch/submit now goes through module client methods (getJSON, postForm).
  • Existing UI behavior and error display flow were preserved.

});
return this.setSubEndpoint(subEndpoint).get(query);
}
}
Copy link
Collaborator

@HenriRabalais HenriRabalais Feb 13, 2026
edited
Loading

Choose a reason for hiding this comment

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

It seems like we are deconstructing the URL only to rebuild it.

The Client shouldn't be sent URLs, it should receive data and then decide for itself which endpoint to target.

Where does the URL string being passed into getJSON originate? Instead of passing a URL, can we pass the raw parameters directly so we can use this.get(query) without all this manual parsing?

Copy link
Collaborator

@HenriRabalais HenriRabalais Feb 13, 2026

Choose a reason for hiding this comment

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

This is making me realise we need to standardize how our Client subclass methods receive data... I'll have to think on how to implement that.

Copy link
Author

@Montekkundan Montekkundan Feb 17, 2026

Choose a reason for hiding this comment

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

I replaced the URL based client call with getData(candID, tabName) and updated the 5 candidate_parameters components to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@HenriRabalais HenriRabalais HenriRabalais requested changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Labels

Language: Javascript PR or issue that update Javascript code Module: candidate_parameters PR or issue related to candidate_parameters module State: Blocked PR or issue awaiting an external event such as the merge or another PR to proceed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /