-
Notifications
You must be signed in to change notification settings - Fork 7
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
AP-5170: Country accessible autocomplete #7166
base: main
Are you sure you want to change the base?
Conversation
080abe8
to
de2251d
Compare
37d9ea9
to
fc002b1
Compare
Quality Gate passedIssues Measures |
fc002b1
to
0c7b2c9
Compare
0c7b2c9
to
f4a084b
Compare
.clear-search { | ||
margin-top: 50px; | ||
|
||
&-error { | ||
margin-top: 90px; | ||
} | ||
} |
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.
RWD: would it be ideal to use the govuk spacing mixin and values?
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.
The values only go up to 60px, sadly
I could do something funky like have the 50px always there and add the extra 40px when there's an error, by either using variables or adding the margin to two separate elements, but they didn't seem right. What do you think?
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.
Nothing funky.
Funky is not standard practice and it always becomes a pain.
As the max value is only 60px. I would suggest we test the responsiveness of your units.
@@ -0,0 +1,42 @@ | |||
import accessibleAutocomplete from 'accessible-autocomplete' |
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.
Componentization improvement: These functions would only work with one accessible component per page, that works for well for our current page layout, could this be made better to by supporting multiple autocompletes on single page
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.
@naseberry Do we need this? I think we'll only ever have one on a page. If so, I'm not sure exactly what you mean or how to achieve it
app/views/providers/home_address/non_uk_home_addresses/show.html.erb
Outdated
Show resolved
Hide resolved
app/views/providers/home_address/non_uk_home_addresses/show.html.erb
Outdated
Show resolved
Hide resolved
543f510
to
b1391d8
Compare
b1391d8
to
f08dd2d
Compare
Reorder validation to change the order it's displayed. Add class to connect accessible autocomplete using class rather than existing id as this changes when there is an error.
Clear search not shown when js is off. Add 'govuk-body' class to update font. Clear search working when js is off. Don't run autocomplete js on other pages
Update tests to reflect changes
Fix vertical alignment when there is an error on the page
Add class to autocomplete when there is an error. Seems to change color back to black once the user starts typing in an answer. This may not be preferable.
Add and remove existing class to show and hide elements Move text into locales files
Following responsive web design, this removes unnecessary extra spacing when on non-desktop devices
f08dd2d
to
bd3e0e7
Compare
Update javascript code so accessible autocomplete component is reusable
ed0d43a
to
f86e737
Compare
Quality Gate passedIssues Measures |
Replace existing search for countries in non-UK home address with accessible autocomplete
Checklist
Before you ask people to review this PR:
bundle exec rake
git rebase main
.