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

Fixed Neighborhood Complete Screen Rendering Early #3690

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

srihariKrishnaswamy
Copy link
Collaborator

Resolves #3680

In this PR, I added some logic to see if we were on the very last un-audited street in a neighborhood, and made sure to show the neighborhood complete screen after that street finishes. I also added logic to delay the display of that overlay to the point where the user jumps to a new street after completing a neighborhood. This necessitated a number of small changes in TaskContainer & MapService, including the addition of a new flag field (to log the fact that we need to display the overlay) that is toggled on when the neighborhood is finished, and turned back off when the overlay is displayed.

Since the code for what jumps happen after a neighborhood is finished is pretty complex & there are a number of different methods that could handle it on a case-by case basis, I made sure to call the new function that conditionally renders the overlay in a few different places so we don't miss out on a case where a neighborhood is complete and the overlay needs to be rendered.

Also, in order to do this, I had to make it so that the old function that was in charge of rendering the overlay is not used anymore, but as of now I left the code in there just because I'm a little iffy on deleting it without a review!

Testing instructions
  1. Open up any 99% neighborhood from the landing page choropleth
  2. Keep clicking through streets until you reach the very last one (can check if a street as previously been audited if it's priority != 1)
  3. Verify that after that street is completed by the user, the overlay displays
  4. Repeat steps 1 - 4 for any other neighborhood's you'd like (in my testing I went through all the 99% ones and called it good)
Things to check before submitting the PR
  • I've written a descriptive PR title.
  • I've added/updated comments for large or confusing blocks of code.
  • I've updated any logging. Clicks, keyboard presses, and other user interactions should be logged. If you're not sure how (or if you need to update the logging), ask Mikey. Then make sure the documentation on this wiki page is up to date for the logs you added/updated.

@srihariKrishnaswamy
Copy link
Collaborator Author

I'm gonna wait till you take a look to delete that now unused method, so just putting that here!

@misaugstad
Copy link
Member

@srihariKrishnaswamy this still isn't working quite like how I imagined! Here's what I'm expecting:

  1. You're on the last street
  2. As you get to the end of the street, you get the "Finish labeling this intersection" message in the bottom-right:
    Screenshot from 2024-10-22 16-37-24
  3. You're able to finish labeling the intersection
  4. You click on the "Finish labeling this intersection" button
  5. The "Neighborhood complete" modal shows up

I tested three times. The first time, the neighborhood complete modal popped up when I was getting close to the end of the intersection, but I wasn't able to finish it before that happened.
Screenshot from 2024-10-22 16-22-52

The second time and third times I got a "you're quite far away from the route" message showing up instead of the one that we wanted. Then the neighborhood complete showed up too early again.
Screenshot from 2024-10-22 16-34-37

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.

Neighborhood complete screen showing up before finishing last street
2 participants