-
Notifications
You must be signed in to change notification settings - Fork 1
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
Crm457 326 offence list #212
Merged
Merged
Conversation
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
Placeholder function as proof of concept for when DOMContentLoaded to show all of the templates for each offence Added code to claim_type page
- code works for main offence field when page is rendered and when submission fails - offences are retrieved from offences endpoint EACH time the autocomplete input is queried, need to understand if there's a method of caching this in via the JS - data isn't being submitted into the form, need to understand why
Also added workaround for known bug of accessible-autocomplete (alphagov/accessible-autocomplete#424) where using templates shows "undefined" on first click/focus Need to fix contrast issues on highlight
This breaks accessible autocomplete
- Use constants for Main Offence Types - Use optional chain expression instead of &&
- Search now includes offence type also - Offence request has an expiry age so that it can be cached - Change offence description to offence name in request - Better conditional handling of suggestion template
- suggestion_select has default data_module attribute instead of using custom flag - use data_module to identify offence select tags instead of element id
- when simulated in capybara with selenium, for some reason, the option doesn't auto select so have to click on the selection
dwhenry
previously approved these changes
Aug 10, 2023
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
dwhenry
approved these changes
Aug 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of change
Link to relevant ticket
Update main offence list
Notes for reviewer
The
clearUndefinedSuggestions()
function is a pretty awkward and not very good workaround for a bug in the accessible-autocomplete - as it standsScreenshots of changes (if applicable)
Before changes:
After changes:
TO DO