Closed AmanAgarwal041 closed 6 days ago
The changes involve the addition of a new test suite for the getQueryParamsFromString
function and a significant update to its implementation. The function now uses the URLSearchParams
API for parsing query parameters instead of manual string manipulation. The new implementation simplifies the process while maintaining error handling. The test suite verifies the function's behavior with query strings containing newline characters.
File Path | Change Summary |
---|---|
app/client/src/utils/getQueryParamsObject.test.ts | Added a new test suite for getQueryParamsFromString , including a test for handling newline characters in query strings. |
app/client/src/utils/getQueryParamsObject.ts | Updated getQueryParamsFromString to use URLSearchParams for parsing query parameters, simplifying the implementation while keeping the function signature unchanged. |
Objective | Addressed | Explanation |
---|---|---|
Ensure query parameters are retained during navigation (37080) | β | |
Fix issues related to branch changes in edit mode (37080) | β | The changes do not directly address branch navigation issues. |
navigateToApplication
function to include branch parameters in URLs, which relates to the handling of query parameters similar to the changes made in the getQueryParamsFromString
function in the main PR.Bug
, Medium
, Needs Triaging
, Framework Functions
, ok-to-test
, Query & JS Pod
, Datasources
π In code we trust, with tests we play,
New paths we forge, come what may!
Parameters parsed, no more fuss,
With each change, we build and discuss!
So hereβs to the tests, both bright and bold,
In our codeβs embrace, new stories unfold! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
/build-deploy-preview
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11910123068.
Workflow: On demand build Docker image and deploy preview
.
skip-tests: . env:
.
PR: 37559.
recreate: .
Deploy-Preview-URL: https://ce-37559.dp.appsmith.com
Description
Earlier we were escaping some special characters using replace method in
getQueryParamsFromString
function ingetQueryParamsObject.ts
file, which was throwing error when we had new line in the url string. Hence, updated the function to useURLSearchParams
which parses the search string and then we return the json usingObject.fromEntries
function. Also added a jest test case for the same.Fixes #37080
or
Fixes
Issue URL
Automation
/ok-to-test tags="@tag.JS, @tag.Binding, @tag.Widget"
:mag: Cypress test results
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Bug Fixes
Tests