Refactor Edges search interfaces: remove $.extend usage and extract reusable URL utility#2562
Refactor Edges search interfaces: remove $.extend usage and extract reusable URL utility#2562varadekd wants to merge 83 commits into
Conversation
richard-jones
left a comment
There was a problem hiding this comment.
A couple of changes to get this to a mergeable state:
-
Could you just put the url.js functions into the main doaj.js library? That's used everywhere, and I could see these functions being useful in other places.
-
The search object searches don't seem to be wired in. Could you add an admin view route (in view/admin.py) for each one and serve the page with the appropriate search initialised. They should also be added to the "System Objects" navigation entry in the admin area.
Could you also make sure to run over all the interfaces and do a side-by-side comparison with the live interfaces to make sure we haven't lost any functionality by accident. Particularly we should focus on the public views.
@usman-cottagelabs maybe this is a good place to bring you in too, to review the functionality? I'll assign you to the issue and add some notes.
|
|
@varadekd bug found: Steps to Reproduce: Step 2 Step 3 Expected Result Actual Result See recording attached. Note: This works fine on the Prod site This also isn't working on /search/journals |
|
@varadekd bug found: PreconditionUser Role: admin Steps to Reproduce:Step 1Go to the DOAJ admin application search at /admin/applications Step 2Filter for Rejected Step 3Click View Application button within a rejected Journal Expected ResultIn the Notes section on the RHS, There should a note attached to the record which indicates that the record was rejected Actual ResultNo note indicting this RecordingScreen Recording 2026-04-27 110800.mp4 Note |
|
@varadekd a high priority bug found: PreconditionUser Role: admin Steps to Reproduce:Step 1Go to the DOAJ admin users search at /account Expected ResultData should show, and search/filter functionality etc Actual ResultNothing shows Screenshot |
|
UPDATE:
Hi @usman-cottagelabs |
|
Thanks @varadekd |
@usman-cottagelabs All the valid changes are pushed under the branch feature/4185_code_refactor. You can go ahead with your testing |
Bug fixed |
Bug fixed |
|
Testing complete. @varadekd |



Refactor Edges search interfaces: remove $.extend usage and extract reusable URL utility
This change performs a small refactor of the Edges search interface code under /portality/static/js/edges/ to reduce duplicated infrastructure logic. The previous $.extend(true, doaj, {...}) pattern used to attach namespaces has been replaced with direct namespace assignments, as deep merge behaviour was not required. In addition, repeated URL construction logic (deriving scheme and host to build the search URL) has been extracted into a shared utility (doaj.edgeUtil.url.build). This keeps the search files focused on defining search behaviour while moving common infrastructure code into a reusable location. No functional behaviour has been changed; this update only improves code clarity and maintainability.
This PR...
Developer Checklist
Developers should review and confirm each of these items before requesting review
constantsormessagesfilesdates)url_fornot hard-codeddevelopReviewer Checklist
Reviewers should review and confirm each of these items before approval
If there are multiple reviewers, this section should be duplicated for each reviewer
constantsormessagesfilesdates)url_fornot hard-codeddevelopTesting
List user test scripts that need to be run
List any non-unit test scripts that need to be run by reviewers
Deployment
What deployment considerations are there? (delete any sections you don't need)
Configuration changes
What configuration changes are included in this PR, and do we need to set specific values for production
Scripts
What scripts need to be run from the PR (e.g. if this is a report generating feature), and when (once, regularly, etc).
Migrations
What migrations need to be run to deploy this
Monitoring
What additional monitoring is required of the application as a result of this feature
New Infrastructure
What new infrastructure does this PR require (e.g. new services that need to run on the back-end).
Continuous Integration
What CI changes are required for this