Skip to content

Conversation

forresttanaka
Copy link
Contributor

No description provided.

* Sort all `type=` query-string elements to the front of all query strings.
* Reduced two simple loops to separate `type=` from other queries to a single more complex loop. Use a more reliable method to get the key value when formatting. Improve comments.
* Fix query-string Jest tests to adjust to the `type=` ordering change.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements query string ordering functionality to ensure type= parameters are moved to the front of query strings to avoid requests getting blocked.

  • Modifies the format() method to sort type= elements to the beginning of query strings
  • Updates tests to reflect the new ordering behavior where type= parameters appear first

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/encoded/static/libs/query_string.js Updates format() method to sort type= elements to front and fixes key extraction logic
src/encoded/static/libs/tests/query_string-test.js Updates test expectations to match new type= first ordering behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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