Enable geolocation for address field in proposal form#13423
Merged
Enable geolocation for address field in proposal form#13423
Conversation
decidim-proposals/app/controllers/decidim/proposals/geolocation_controller.rb
Fixed
Show fixed
Hide fixed
360b4c5
Co-authored-by: Ivan Vergés <ivan@pokecode.net>
Co-authored-by: Ivan Vergés <ivan@pokecode.net>
…congig.show_my_location_button
Member
Author
|
@alecslupu could you please take a look at these changes? I was also able to reproduce the issue you encountered, and I've implemented a fix for it as well. Let me know if you have any additional feedback |
alecslupu
suggested changes
Nov 2, 2024
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
All the changes requested by contractor have been implemented. Dismissing to be able to merge.
entantoencuanto
added a commit
that referenced
this pull request
Nov 6, 2024
…n-flow * develop: Update UI design of detail page (#13356) Fix newsletter subscriber count (#13471) Fix editor image routing (#12683) Fix issues with the budgets proposals import (#12655) Fix initiative form is not taking into account the scope selected (#13598) Enable geolocation for address field in proposal form (#13423)
entantoencuanto
added a commit
that referenced
this pull request
Nov 6, 2024
…eature/ephemeral-verifications * feat/improve-registration-and-verification-flow: Update UI design of detail page (#13356) Fix newsletter subscriber count (#13471) Fix editor image routing (#12683) Fix issues with the budgets proposals import (#12655) Fix initiative form is not taking into account the scope selected (#13598) Enable geolocation for address field in proposal form (#13423)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🎩 What? Why?
This PR implements a feature allowing participants to use their device’s geolocation to automatically fill in the address field when creating a proposal.
⚙️ Feature Configuration for "Use my current location" Button
To enable the "Use my current location" button in the geocoded address field for additional components, you can configure this feature in
Decidim::Core.In the
config_accessor :show_my_location_button, simply add the manifest names of the components you want to enable this feature for.Here’s how you can configure it:
By default, this feature is enabled for the
:proposalscomponent, but you can easily extend it to other components by adding their manifest names to the array.📌 Related Issues
Testing
Create Proposal with Geolocation:
Edit Proposal with Geolocation:
Geolocation Disabled in Browser:
Expected Results:
📷 Screenshots