From notifications at github.com Sun Feb 1 09:24:27 2026 From: notifications at github.com (Areeb Siddiqui) Date: Sun, 01 Feb 2026 01:24:27 -0800 Subject: [openstreetmap/openstreetmap-website] Add datalist to display multiple search results (PR #6765) Message-ID: <!-- Please read the contributing guidelines before making a PR: https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md Pay particular attention to the section on how to present PRs: https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#pull-requests --> ### Description Fixes #6368 This PR adds a suggestion menu similar to Valhalla to give users options to choose from. - Increase query limit from 1 to 5 to show more options - Populate datalist with search results for user selection - Add findDatalistOption to use cached coordinates when user selects from datalist, avoiding redundant queries <img width="769" height="760" alt="Screenshot 2026-02-01 004347" src="https://github.com/user-attachments/assets/236c3772-e0d6-48f3-9420-b17ea0c2de33" /> It uses `<datalist>` that are not the best in appearance but is getting the job done. Problem with `<ul>` and `<div>` was that options menu was getting clipped off by directions-output sidebar. ### How has this been tested? - Manually tested in the browser by entering locations with multiple matches and selecting options from the suggestion list - Linting test You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6765 -- Commit Summary -- * Add datalist to display multiple search results -- File Changes -- M app/assets/javascripts/index/directions-endpoint.js (54) M app/assets/javascripts/index/directions.js (4) M app/views/layouts/_search.html.erb (6) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/6765.patch https://github.com/openstreetmap/openstreetmap-website/pull/6765.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6765 You are receiving this because you are subscribed to this thread. Message ID: <openstreetmap/openstreetmap-website/pull/6765 at github.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 09:41:28 2026 From: notifications at github.com (Areeb Siddiqui) Date: Sun, 01 Feb 2026 01:41:28 -0800 Subject: [openstreetmap/openstreetmap-website] Add datalist to display multiple search results (PR #6765) In-Reply-To: References: Message-ID: SykoDaedalus left a comment (openstreetmap/openstreetmap-website#6765) Valhalla has better styling for their options menu. I was facing difficulty to achieve something similar because the menu was getting clipped off and I was unable to discover its cause. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6765#issuecomment-3830724528 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 09:47:01 2026 From: notifications at github.com (Areeb Siddiqui) Date: Sun, 01 Feb 2026 01:47:01 -0800 Subject: [openstreetmap/openstreetmap-website] Add datalist to display multiple search results (PR #6765) In-Reply-To: References: Message-ID: @SykoDaedalus pushed 1 commit. 96d491d8486e8d40dad43da6d42aad644d92d95d Add datalist to display multiple search results -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6765/files/4d3c4aaa19d02072017f6f5f094dedbcdc6331f0..96d491d8486e8d40dad43da6d42aad644d92d95d You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 09:55:26 2026 From: notifications at github.com (Tom Hughes) Date: Sun, 01 Feb 2026 01:55:26 -0800 Subject: [openstreetmap/openstreetmap-website] Add datalist to display multiple search results (PR #6765) In-Reply-To: References: Message-ID: @tomhughes commented on this pull request. > endpoint.setValue(value); } + function findDatalistOption(value) { + if (!datalist || !datalist.length) return null; As we always provide a datalist I don't think this is required? The value should never be null and if the length is zero then we just won't match in the loop? > @@ -84,6 +109,10 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, marker, dragCallback, cha delete endpoint.value; input.val(""); map.removeLayer(endpoint.marker); + + if (datalist && datalist.length) { Same goes here - datalist should always be set and calling empty on an empty list should be safe? > + setLatLng(L.latLng(lat, lon)); + endpoint.value = value; + input.val(value); + changeCallback(); This is duplicating code in `setValue` so I think we need to share that - could we not just use `setValue` here if we passed in the lat/lon object? Obviously it would then only look for lat/lon in the text if that argument wasn't passed... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6765#pullrequestreview-3735399416 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 10:18:57 2026 From: notifications at github.com (Areeb Siddiqui) Date: Sun, 01 Feb 2026 02:18:57 -0800 Subject: [openstreetmap/openstreetmap-website] Add datalist to display multiple search results (PR #6765) In-Reply-To: References: Message-ID: @SykoDaedalus pushed 1 commit. f116ccc13b7528031046f2eff326fd4debd6f0a2 Add datalist to display multiple search results -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6765/files/96d491d8486e8d40dad43da6d42aad644d92d95d..f116ccc13b7528031046f2eff326fd4debd6f0a2 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:00:55 2026 From: notifications at github.com (lunaperezclaudio-svg) Date: Sun, 01 Feb 2026 10:00:55 -0800 Subject: [openstreetmap/openstreetmap-website] 2464707387 (Issue #6766) Message-ID: lunaperezclaudio-svg created an issue (openstreetmap/openstreetmap-website#6766) -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6766 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:01:10 2026 From: notifications at github.com (lunaperezclaudio-svg) Date: Sun, 01 Feb 2026 10:01:10 -0800 Subject: [openstreetmap/openstreetmap-website] 2464707387 (Issue #6766) In-Reply-To: References: Message-ID: lunaperezclaudio-svg left a comment (openstreetmap/openstreetmap-website#6766) Ubicasion de este n?mero -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6766#issuecomment-3831620663 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:22:51 2026 From: notifications at github.com (=?UTF-8?B?TWluaCBOZ3V54buFbg==?=) Date: Sun, 01 Feb 2026 10:22:51 -0800 Subject: [openstreetmap/openstreetmap-website] 2464707387 (Issue #6766) In-Reply-To: References: Message-ID: Closed #6766 as not planned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6766#event-22446943975 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:45:04 2026 From: notifications at github.com (lunaperezclaudio-svg) Date: Sun, 01 Feb 2026 10:45:04 -0800 Subject: [openstreetmap/openstreetmap-website] 2464707387 (Issue #6766) In-Reply-To: References: Message-ID: lunaperezclaudio-svg left a comment (openstreetmap/openstreetmap-website#6766) Ubicasion de este n?mero -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6766#issuecomment-3831744025 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:46:15 2026 From: notifications at github.com (Tom Hughes) Date: Sun, 01 Feb 2026 10:46:15 -0800 Subject: [openstreetmap/openstreetmap-website] More padding for menu items on mobile devices (PR #6730) In-Reply-To: References: Message-ID: tomhughes left a comment (openstreetmap/openstreetmap-website#6730) There are plenty of other places that have multiple bootstrap classes applied to things, but maybe it would be worth adding a helper to `app/helpers/application_helper.rb` for generating those items? There's already a helper there used to generate the class on the link element but maybe the helper should generate the whole li element and it's link? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6730#issuecomment-3831745464 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:50:19 2026 From: notifications at github.com (Tom Hughes) Date: Sun, 01 Feb 2026 10:50:19 -0800 Subject: [openstreetmap/openstreetmap-website] Add a suffix to text of anonymous notes (PR #6764) In-Reply-To: References: Message-ID: Reopened #6764. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6764#event-22447237532 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Sun Feb 1 18:51:39 2026 From: notifications at github.com (Tom Hughes) Date: Sun, 01 Feb 2026 10:51:39 -0800 Subject: [openstreetmap/openstreetmap-website] Add a suffix to text of anonymous notes (PR #6764) In-Reply-To: References: Message-ID: tomhughes left a comment (openstreetmap/openstreetmap-website#6764) The point is that I have no idea what my review comments would be if I were to review this but I do know that trying to pre-emptively say that certain possible comments are somehow not allowed is not acceptable as far as I'm concerned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6764#issuecomment-3831753482 You are receiving this because you are subscribed to this thread. Message ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: