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: keep tree_id parameters when bounds are updated #1661

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

henlam1
Copy link
Contributor

@henlam1 henlam1 commented Jun 29, 2023

Description

  • I've tested this locally by selecting the wallet at http://localhost:3000/wallets/tendry@bondy.earth?tree_id=5413738
  • I used a for loop to add query parameters into the router query
  • Since router.query.tree_id is a string and result.query.tree_id was a number, I casted tree_id to string because it was an eslint requirement that they're the same type.
  • I added a new test case in pathResolver.test.js

Fixes #1556

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Before After
"screenshot before" "screenshot after"

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@henlam1 henlam1 marked this pull request as ready for review July 2, 2023 02:12
@henlam1 henlam1 requested a review from dadiorchen July 4, 2023 02:28
@dadiorchen
Copy link
Collaborator

@henlam1 thank you, can you try run your code locally and check if the bug is gone? you can set this to reproduce the bug: https://github.com/Greenstand/treetracker-web-map-client/tree/cwm#how-to-connect-to-production-data-locally

@henlam1
Copy link
Contributor Author

henlam1 commented Jul 5, 2023

@dadiorchen glad to help. I'm locally connected to the production data and the bug is gone when I tested. The new code passes all unit tests in pathResolver.test, including the new test case I included.

@dadiorchen
Copy link
Collaborator

@henlam1 that's great, thank you for your contribution, hope you can help us more!

@dadiorchen dadiorchen merged commit e21b0f1 into Greenstand:main Jul 6, 2023
3 checks passed
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

🎉 This PR is included in version 2.5.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When update the url with bounds, we should remain all other existing ones (parameters)
2 participants