Skip to content

Conversation

@Adnan-cds
Copy link
Contributor

@Adnan-cds Adnan-cds commented Mar 28, 2022

Resolves #9

This change displays the manual address entry button labelled "Can't find the address?" based on address lookup element configuration.

The manual address entry button is displayed at all times at the moment. This new configuration captures whether to reveal this button from the beginning or only after an address search.

By default, the manual address entry button will continue to appear as soon as the LocalGov address lookup element is loaded.

How to test

  • Install the localgov_forms module.
  • Add the "LocalGov Address lookup" element to a Webform.
  • The address lookup element's configuration form has a new config item called "When to display the manual address entry button". The default is to always display it as is now the case. Either leave it as it is or choose the other option.
  • Save and test the form.

Screenshot of the new config item follows:
screenshot-address-lookup-config

The localgov_os_places Geocoder plugin has moved to the localgov_geo module.  As
such, localgov_forms.geocoder.schema.yml has also moved to the localgov_geo
module and now lives on as localgov_geo.geocoder.schema.yml.
The manual address entry button labelled "Can't find the address?" is displayed
at all times at the moment.  This new configuration captures whether to reveal
this button from the beginning or only after an address search has happened.
Display the Manual address entry button labelled "Can't find the address?" based
on address lookup element configuration.
Adding a new Webform config where the Manual address entry button is displayed
*after* an address search.  This Webform is then used in a new test to verify
the behaviour of the manual address entry button.
...and packages required to use the Localgov OS Places geocoder plugin.
@Adnan-cds Adnan-cds marked this pull request as draft March 29, 2022 11:05
@Adnan-cds
Copy link
Contributor Author

Taking it to Draft state while we gather feedback from further manual testing. Sorry about the confusion.

@Adnan-cds
Copy link
Contributor Author

This is Ready for review. We have agreed to add more tickets and pull requests to address the issues arising from the UX review. So this one can go ahead as is.

@Adnan-cds Adnan-cds marked this pull request as ready for review May 24, 2022 11:36
Copy link
Member

@ekes ekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say get it merged. Only reason to hold off is if @andybroomfield you think this would be an issue for your usage of this?

manualButton.removeClass('hidden');

// Hide manual entry button if asked for.
if (typeof settings.centralHub.isManualAddressEntryBtnAlwaysVisible !== 'undefined' && !settings.centralHub.isManualAddressEntryBtnAlwaysVisible) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probbably remove reference to CentralHub at some point. :-)

Copy link
Contributor

@andybroomfield andybroomfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is fine, we can pick up the issue about overriding the label and settings as a later issue.

@Adnan-cds
Copy link
Contributor Author

Thanks Andy. Merging...

@Adnan-cds Adnan-cds merged commit ab5c403 into 1.x May 30, 2022
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.

[Address lookup] "Can't find the address?" button is always visible

4 participants