-
Notifications
You must be signed in to change notification settings - Fork 17
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
HOFF-160: Create postcode lookup component #466
Open
mislam987
wants to merge
9
commits into
master
Choose a base branch
from
HOFF-768
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f998c18
HOFF-160: Create postcode lookup component
mislam987 6adf929
Added postcode-lookup.js and functional tests
mislam987 3d4bc13
HOFF-672: Add de-indexing toggle functionality
mislam987 f1208fd
Code refactoring
mislam987 6f200d0
Further code changes
mislam987 db0e251
Added test cases and refactored code
mislam987 7967a12
Further code refactoring
mislam987 b7a67fb
Merge branch 'master' into HOFF-768
mislam987 2440040
HOFF-986: Fix bug where postcode with punctuation was not allowed
Rhodine-orleans-lindsay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ coverage | |
build/Release | ||
node_modules | ||
.emails | ||
.vscode |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint max-len: 0, no-process-env: 0 */ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
CANT_FIND: 'I cannot find the correct address', | ||
CHANGE: 'Change postcode', | ||
SEARCH_BY_POSTCODE: 'Search address by postcode', | ||
POSTCODE_HEADING: 'What is your UK postcode?', | ||
POSTCODE_LABEL: 'Postcode', | ||
POSTCODE_HINT: 'Enter a full UK postcode, for example AA3 1AB', | ||
ADDRESS_LOOKUP_HEADING: 'Select the main applicant’s address', | ||
MANUAL_ADDRESS_HEADING: 'Enter the main applicant’s address', | ||
MANUAL_ADDRESS_PARAGRAPH: 'This must match the applicant’s address in Home Office records.', | ||
SEARCH_ERROR_HEADING: 'Sorry, there is a problem with the postcode search', | ||
SELECT_LABEL: 'Select the address', | ||
ADDRESS_LINE_1_LABEL: 'Address line 1', | ||
ADDRESS_LINE_2_LABEL: 'Address line 2 (optional)', | ||
TOWN_OR_CITY_LABEL: 'Town or city', | ||
POSTCODE_MANUAL_LABEL: 'Postcode', | ||
POSTCODE_ERROR: { | ||
'error-heading': 'Sorry, there is a problem with the postcode search', | ||
'lookup-problem-title': 'Address lookup problem - GOV.UK' | ||
}, | ||
NO_ADDRESS_HEADING: 'No address found', | ||
ENTER_MANUALLY: 'Enter address manually', | ||
ADDRESS_LOOKUP_SEARCH_TITLE: 'Postcode lookup search - GOV.UK', | ||
ADDRESS_LOOKUP_TITLE: 'Address lookup - GOV.UK', | ||
ADDRESS_DETAILS_TITLE: 'Address details - GOV.UK', | ||
ADDRESS_LOOKUP_PROBLEM_TITLE: 'Address lookup problem - GOV.UK' | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either the naming of the file or the exported object structure can be improved. It looks like the file is just default error messages, so you can either rename the file to something like defaultErrorMessages.js or change the structure of the object returned to something like:
`module.exports = {
errorMessages: {
CANT_FIND: '...',
...;
}
}`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now moved the variables linked to an issue with the postcode lookup to within the
POSTCODE_ERROR
structure within this file. The rest of the properties are not issues with the lookup, so have kept them as independent variables.