Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: appsmith.URL.queryParams update on same page navigation #32382

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

rishabhrathod01
Copy link
Contributor

@rishabhrathod01 rishabhrathod01 commented Apr 3, 2024

Description

  • Making sure to trigger evaluation after navigateTo on same page to make sure we update the appsmith.URL.queryParams
  • Update the cypress test to check queryParams update on same page

Fixes #26831

Steps to test

  1. Add a button widget
  2. Add a navigateTo action on click event of button
  3. NavigateTo should have params as below and should navigate to same page
{{
{
key: "aff", 
key2: "dsfs" 
}
}}
  1. Add a text widget with binding {{appsmith.URL.queryParams}}
  2. Make sure that the text widget updates once the button is clicked

Automation

/ok-to-test tags="@tag.JS"

🔍 Cypress test results

Important

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8598783804
Commit: 634477b53582ae5392eb26dde1a1fcd434f55883
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

Summary by CodeRabbit

  • New Features
    • Added support for setting URL data through Redux actions for enhanced state management.

@github-actions github-actions bot added Bug Something isn't working Javascript Product Issues related to users writing javascript in appsmith Framework Functions Cases related to internal functions like showAlert(), navigateTo() etc... Low An issue that is neither critical nor breaks a user flow Production labels Apr 3, 2024
@rishabhrathod01 rishabhrathod01 self-assigned this Apr 3, 2024
@rishabhrathod01 rishabhrathod01 added ok-to-test Required label for CI and removed Low An issue that is neither critical nor breaks a user flow Production Javascript Product Issues related to users writing javascript in appsmith Framework Functions Cases related to internal functions like showAlert(), navigateTo() etc... labels Apr 3, 2024
@github-actions github-actions bot added Javascript Product Issues related to users writing javascript in appsmith Framework Functions Cases related to internal functions like showAlert(), navigateTo() etc... Low An issue that is neither critical nor breaks a user flow Production labels Apr 3, 2024
@rishabhrathod01 rishabhrathod01 added the Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. label Apr 3, 2024
@rishabhrathod01 rishabhrathod01 marked this pull request as ready for review April 3, 2024 12:51
Copy link
Contributor

coderabbitai bot commented Apr 3, 2024

Walkthrough

Walkthrough

The change introduces a new Redux action type SET_URL_DATA to the EVALUATE_REDUX_ACTIONS array, enhancing URL data handling capabilities. This aims to address issues with parameter passing in navigation within the same page, improving functionality without manual edits.

Changes

File Path Change Summary
.../src/ce/actions/evaluationActionsList.ts Added ReduxActionTypes.SET_URL_DATA to EVALUATE_REDUX_ACTIONS array
.../src/sagas/ActionExecution/NavigateActionSaga.ts Added put import, modified imports, added dispatch for TRIGGER_EVAL
.../cypress/e2e/Regression/ClientSide/ActionExecution/NavigateTo1_spec.ts Updated widget interactions, assertions, and deployment actions

Assessment against linked issues

Objective Addressed Explanation
Sending params using navigateTo to the same page does not work unless edited (#26831)
navigateTo()'s promise resolving before queryParams are updated, affecting dynamic updates (#32348)
Newly created applications not appearing without refresh, and errors with default dataset page generation (#30431) The changes do not directly relate to application creation or dataset issues.
List widget's selectedItem not reflecting dynamically updated values immediately (#25639) The modifications do not pertain to List widget behavior.
Enable JSMode for 1-click binding remaining in JS mode after adding an API action (#31185) The changes are unrelated to JSMode or 1-click binding functionalities.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rishabhrathod01 rishabhrathod01 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 3, 2024
@github-actions github-actions bot added the Integrations Product Issues related to a specific integration label Apr 4, 2024
@rishabhrathod01 rishabhrathod01 added ok-to-test Required label for CI and removed Integrations Product Issues related to a specific integration labels Apr 4, 2024
@github-actions github-actions bot added the Integrations Product Issues related to a specific integration label Apr 4, 2024
@AmanAgarwal041
Copy link
Contributor

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Apr 5, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8571947418.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 32382.
recreate: .

Copy link

github-actions bot commented Apr 5, 2024

Deploy-Preview-URL: https://ce-32382.dp.appsmith.com

@rishabhrathod01 rishabhrathod01 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 8, 2024
@rishabhrathod01
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Apr 9, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8611704056.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 32382.
recreate: .

Copy link

github-actions bot commented Apr 9, 2024

Deploy-Preview-URL: https://ce-32382.dp.appsmith.com

Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 left a comment

Choose a reason for hiding this comment

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

Tested. It works as expected!

@rishabhrathod01 rishabhrathod01 merged commit 36dedc0 into release Apr 9, 2024
44 checks passed
@rishabhrathod01 rishabhrathod01 deleted the fix/navigateToSamePageUrlUpdate branch April 9, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Framework Functions Cases related to internal functions like showAlert(), navigateTo() etc... Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Javascript Product Issues related to users writing javascript in appsmith Low An issue that is neither critical nor breaks a user flow ok-to-test Required label for CI Production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Sending params using navigateTo to the same page on the same window does not work unless edited
2 participants