Skip to content

Enable geolocation for address field in proposal form #13315

@carolromero

Description

@carolromero

Is your feature request related to a problem?

As a participant, when I want to publish a proposal that allows adding an address, I miss the option to send my location in case I am at the address I want to add.

Describe the solution you'd like

As a participant, I would like to have the option to use my device's geolocation to automatically fill in the address field of the proposal form.

Mockups

Image

Image

Additional context

There is a module that allows, among other features, this function: https://github.com/openpoke/decidim-module-reporting-proposals#features

Could this issue affect users' private data?

It could, as enabling geolocation would share their current location with the platform. Participants should be informed about this and given the option to opt in or out.

Acceptance criteria

  • Given I am a participant using the proposal form, when I view the address field, then I should see a link to "Use my current location" below the address field if the "Maps enabled" setting is checked.
  • Given that I click the "Use my current location" link, when my device requires location access permissions, then I should be prompted to grant or deny this permission.
  • Given that I grant location access, when the device successfully retrieves my geolocation, then the address field should be automatically populated with the closest identifiable address based on my location.
  • Given that I grant location access, when the device fails to retrieve my location or cannot determine an address, then I should see an error message indicating that the location could not be retrieved and an option to manually enter the address.
  • Given that I have used the geolocation feature, when the address field is populated, then I should still be able to manually edit or override the address before submitting the proposal.
  • Given that I am using the geolocation feature, when I am on different devices or browsers, then the feature should work consistently across all supported devices and browsers.
  • Given that the geolocation feature is enabled, when participants are prompted to use their location, then they should see a brief privacy notice explaining how the location data will be used and that it won’t be stored after the proposal is submitted.
  • Given that the geolocation feature is part of the form, when participants use screen readers or other accessibility tools, then the feature should be fully accessible and provide equivalent functionality.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Merged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions