-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add site description to rtn. req. bookmark links #1358
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
https://eaflood.atlassian.net/browse/WATER-4685 > Part of the work to migrate return versions from NALD to WRLS During UAT of the new view return version and requirements page users have let us know that though useful, the bookmark links that currently display a return requirement's reference would be even better if they included the site description as well. It's not so bad for return versions with 2 or 3 return requirements. But any more than that it can be harder to find or recall which requirement you want to go back to. Well, our users wish is our command!
Cruikshanks
requested review from
robertparkinson,
Jozzey,
jonathangoulding,
Beckyrose200 and
rvsiyad
September 25, 2024 15:47
jonathangoulding
approved these changes
Sep 25, 2024
robertparkinson
approved these changes
Sep 25, 2024
Jozzey
approved these changes
Sep 25, 2024
Cruikshanks
added a commit
that referenced
this pull request
Oct 3, 2024
https://eaflood.atlassian.net/browse/WATER-4685 We recently made a change to [Add the site description to bookmark links in the view return version page](#1358). In testing our QA team have spotted that there are some return requirements we've imported from NALD that do not have a site description. Site description will be a mandatory field when WRLS takes over management of returns. But we'll still have to support view those imported from NALD. So, this change updates the view to handle return requirements with no site description.
Cruikshanks
added a commit
that referenced
this pull request
Oct 4, 2024
https://eaflood.atlassian.net/browse/WATER-4685 We recently [Added the site description to bookmark links in the view return version page](#1358). In testing, our QA team has spotted that some return requirements we've imported from NALD do not have a site description. When WRLS takes over return management, site description will be a mandatory field. However, we'll still have to support viewing returns imported from NALD. So, this change updates the view to handle return requirements with no site description.
Cruikshanks
added a commit
that referenced
this pull request
Oct 9, 2024
https://eaflood.atlassian.net/browse/WATER-4685 > Part of the work to migrate managing return requirements from NALD to WRLS In [Add site description to rtn. req. bookmark links](#1358) we added the return requirement site description to the bookmarks we display when viewing a return version with more than one requirement. However, in that change we didn't cater for the fact users have added site descriptions that include special characters, for example `& " '`. When these descriptions are included in the bookmark links, they appear like this. - `Return reference 100234 - Quantities taken between points X, Y &Z` - `Return reference 100432 - Opposite "Old cottage" entrance` - `Return reference 100567 - Borehole in 'middle' field` This changes updates the logic to escape these characters.
Cruikshanks
added a commit
that referenced
this pull request
Oct 10, 2024
https://eaflood.atlassian.net/browse/WATER-4685 > Part of the work to migrate managing return requirements from NALD to WRLS In [Add site description to rtn. req. bookmark links](#1358) we added the return requirement site description to the bookmarks we display when viewing a return version with more than one requirement. However, that change didn't account for users' adding site descriptions that include special characters, such as `" & '`. When these descriptions are included in the bookmark links, they appear like this. - `Return reference 100234 - Quantities taken between points X, Y &Z` - `Return reference 100432 - Opposite "Old cottage" entrance` - `Return reference 100567 - Borehole in 'middle' field` This change updates the logic to escape these characters. --- The problem is caused because the description is being added to a non-markup object `<a>`. This means Nunjucks is auto-escaping the content to protect us from an XSS attack. To tell it not to auto-escape we have to use the [safe filter](https://mozilla.github.io/nunjucks/templating.html#autoescaping).
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.
https://eaflood.atlassian.net/browse/WATER-4685
During the UAT of the new view return version and requirements page, users let us know that, though useful, the bookmark links that currently display a return requirement's reference would be even better if they included the site description as well.
It's not so bad for return versions with 2 or 3 return requirements. But with more than that, it can be harder to find or recall which requirement you want to return to.
Well, our users' wish is our command!