Skip to content

Conversation

@17Ayaan28
Copy link
Contributor

Hey Jake, I have added an option in the form to select a nearby node, when a user chooses a two stage crossing. When a user select an intersection in the beginning and then chooses two stage crossing - a map is displayed with nodes other than the one first selected. IF location is not available then it just says "Unable to access location."

Screen.Recording.2023-11-02.at.12.14.26.am.mov

I was wondering how I should proceed with asking for the measurements for the second node. We can't redirect them to the exact same component because it also has the potential of going into an infinite loop of choosing a two stage crossing even for the second stage.

If the user chooses a two stage crossing - we can add another form down below for the user to optionally fill and submit ?

@jakecoppinger
Copy link
Owner

Thanks for looking at this. I'm uneasy with prompting for multiple points and taking the measurements in the same form submission; the form submission process is already quite long and I don't want it to become longer.

My initial idea was that if they select an intersection as a two stage crossing, at the end of the form process we display a link to contribute a measurement for the adjacent crossing. (detailed in

This would however require a new form "success" screen (rather than just an alert()) to support the display of a clickable hyperlink, as well as #24 to be implemented.

Perhaps a simpler solution would just be to change the copy text of the alert() so that when the submission was two stage, it includes the text "Please fill out the form again for other stages of the crossing if relevant". I've created #33 for this. I'm also concerned the form isn't being completely wiped after a submission; this is probably the most pressing of all (and would confuse users being prompted to make multiple submissions).

Feel free to poke holes in this idea or suggest alternatives!

@17Ayaan28
Copy link
Contributor Author

I have created an MR for #24 although there is a bit of work to be done still. Once that is done, I will work on this again.

@17Ayaan28
Copy link
Contributor Author

Hey Jake, have used #24 for this -

A modal appears after a measurement is contributed to prompt the user to add a measurement for the second stage of the crossing.
Also, I have updated the regex I had used in #24, I had assumed Node Ids are serialised but they're not. Also, the number of nodes keeps increasing. So I removed the upper limit for the Node Id number.

@17Ayaan28
Copy link
Contributor Author

Screen.Recording.2023-11-18.at.4.07.46.pm.mov

@jakecoppinger
Copy link
Owner

I'm not sure if I follow - how does the link for contributing to the second stage of the crossing know which intersection ID to start on?

@17Ayaan28
Copy link
Contributor Author

17Ayaan28 commented Dec 20, 2023

@jakecoppinger So, let's say the user wants to contribute a measurement for a two stage crossing, which has two nodes (one for each part of the crossing). The user initially selects a node using "Find intersections near me" and selects the first node. If later in the form, they specify that it's a 2 stage crossing by selecting "yes", the map opens again and they are able to choose the second node. The ID of this node gets stored in the state. Once they submit this form, a modal will open that leads them to contribute-measurment/secondNodeID.

@17Ayaan28
Copy link
Contributor Author

@jakecoppinger if you have time, could you see if the above makes sense ?

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.

2 participants