-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Flexible Element Search #7775
Flexible Element Search #7775
Conversation
Accept a variety of formats in Feature Search when specifying an element by type and id. For example: n123, n 123, node123, node 123 or even https://www.openstreetmap.org/node/123/history#map=19/43.66140/-70.25415
I ran |
We can add some tests for all the cases we want to match/don't match too so that this improved functionality never gets accidentally broken 👍 Don't worry about that in this PR though, I'd be happy to do that kind of maintenance after merge |
I wanted to add tests, but didn't know where to put them, or how best to extract the function for testing. Thanks for handling it. |
@blackboxlogic Thanks for working on this! Welcome to the dev side of iD 🔨 @SilentSpike Thanks a bunch for taking an interest. The code looks reasonable to me at first glance, but I'll defer to you. Feel free to merge and tweak this as needed. (Tests are always stellar too, since you mentioned them.) Oh, and if anyone's feeling inspired it might be a good idea to break out some of this functionality into separate functions instead of having everything in |
@blackboxlogic I've tested this and it's good to go, will merge as is now 👍 If you'd like to learn how to add the tests yourself, let me know and I an point you in the right directions 😃 If not, I don't mind taking care of it. |
Fix #7627
Accept a variety of formats in Feature Search when specifying an element by type and id.
For example: n123, n 123, node123, node 123 or even https://www.openstreetmap.org/node/123/history#map=19/43.66140/-70.25415