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 navigation on point click #5962

Closed

Conversation

tsmock
Copy link
Contributor

@tsmock tsmock commented Jul 6, 2023

From #5721 (comment)

I noticed that the circle layer for the tasks centroid on the project detail page does not navigate to the task selection page when clicked. This functionality appears to be broken.

https://github.com/facebook/OSM-HOT-Tasking-Manager/blob/1ff61218946e43cec7f66c65dc225ac8410b7fa8/frontend/src/components/taskSelection/map.js#L399-L400

EDIT: Something unusual is happening here: when you press the back button on the browser numerous times, you'll find that the app did navigate to the intended route, indicating that the on-click event is being triggered multiple times. We can eliminate the problem by removing the relative navigation and instead using the full path '/projects/:id/tasks,' but the back functionality still won't work.

Current (deployed) behavior (back pages):

Expected behavior:

@tsmock tsmock force-pushed the fixup/navigation-on-point-click branch from 5eaff43 to ec0571d Compare July 6, 2023 14:16
@tsmock tsmock marked this pull request as ready for review July 6, 2023 14:17
@tsmock tsmock force-pushed the fixup/navigation-on-point-click branch 2 times, most recently from 8fc0bab to c30a2f5 Compare July 10, 2023 12:37
@sonarcloud
Copy link

sonarcloud bot commented Jul 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@tsmock tsmock force-pushed the fixup/navigation-on-point-click branch from c30a2f5 to 98794c1 Compare February 12, 2024 20:10
This happens due to the navigate function being called multiple times
for the same click. The best fix is to debounce the function to avoid
having the function run multiple times.

Signed-off-by: Taylor Smock <[email protected]>
@tsmock tsmock force-pushed the fixup/navigation-on-point-click branch from 98794c1 to bd53394 Compare February 12, 2024 20:11
Copy link

sonarcloud bot commented Feb 12, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@tsmock
Copy link
Contributor Author

tsmock commented Feb 12, 2024

Looks like this got fixed by some other changes; it is no longer reproducible on the production TM server.

@tsmock tsmock closed this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant