Closed EricDube closed 4 years ago
I've now finished testing that all provinces get the right result. Just the French ordering needs fixing as far as I can see
Province Sorting has been fixed, just need to fix unit tests
Order of provinces looks great!
I've also addressed @katedee 's comments about the drop down colours
I'd recommend decoupling the js from the dropdown macro, and using the webpack build pipeline to compile the related js.
So:
accessible-autocomplete.min.js
file from both assets/js
and public/dist/js
npm install --save accessible-autocomplete
dropdown.njk
macroroutes/question-province/js/question-province.js
import and setup the autocomplete:import accessibleAutocomplete from 'accessible-autocomplete'
accessibleAutocomplete.enhanceSelectElement({
selectElement: document.querySelector('#province-select'),
showAllValues: true,
showNoOptionsFound: false,
})
webpack.common.js
:entry: {
styles: './assets/scss/app.scss',
app: './assets/js/app.js',
province: './routes/question-province/js/question-province.js',
},
routes/question-province/question-province.njk
:{% block scripts %}
<script type="text/javascript" src="{{ asset('/dist/js/province.js') }}"></script>
{% endblock %}
Reviewed and approved, thank you!
Description
Dropdown
Closes: https://trello.com/c/KcuVOorR/181-people-can-type-to-select-their-province-or-territory-from-a-list Allow users to select their province or territory from a drop down list. It allows the users to type in the province or territory and will auto-complete to the appropriate value. It does not allow values not in the list.
Test Instructions
Back Button
Modified implementation of the Back button. The back button now stores a history of pages viewed in the session so the user can navigate back to the last page viewed with javascript disabled.
Test Instructions for back button changes
Help Requested