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
Reduce content duplication in "Making your application" in Overseas Passports #1909
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
A version with 'first name and last name' of this sentence is repeated a few times in this Smart Answer. After consulting with a content designer I am making this sentence consistent with the others. I am planning to reduce duplication of the "Making your application" section and this should make it easier. None of the regression test artefacts seems to cover the case where this sentence is used, therefore non of the artefacts have changed.
Move "Making your application" section from ips_application_result to making_your_application partial. Nest other partials used by making_your_application under a making_your_application directory. I believe this makes it explicit where those partials are used, as there are many more in the main overseas-passports dir. However, the checksum generation script does not automatically pick up those partials and will need to be improved to select erb partials recursively. The '? ' prefix in the overseas-passports-files.yml has been introduced to longer template notes. This has been generated automatically. YAML treats keys longer than 128 characters as "complex" keys that are denoted by a '? ' prefix.
…ovspeak.erb Remove content duplication for ips 2 and 3 variants. The changes in regression test artefacts are insignificant white space changes.
If a Smart Answer views directory is not flat and contains partials nested under directories - detect them automatically. Currently only overseas-passports has nested partials.
Extract commonly used paragraphs into partials and reuse them. This introduces insignificant whitespace changes to outcomes and changes one sentence from "You’ll get an email..." to "You will receive an email..." so that the same partial can be used. It is OK with a content designer. Rationale: even though content is not code, duplication of it is not great. When change requests come in, they usually have before/after text. If the text is duplicated, it makes it hard to trace back where the change needs to be made. It also reduces the text to code ratio in the making_your_application template, making it easier to follow logic flows.
This looks great to me. Good work! |
Use standard partials for the phrases in _send_application_ips.govspeak.erb. This merges two paragraphs into a single one, but it's ok for the sake of standardisation.
tadast
force-pushed
the
tt_cleanup_overseas_passports
branch
from
August 26, 2015 15:48
77fedb4
to
7bad696
Compare
tadast
added a commit
that referenced
this pull request
Aug 27, 2015
Reduce content duplication in "Making your application" in Overseas Passports
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.
The aim of this change is to make it easier to understand what needs changing when a change request comes in. Duplicated paragraphs make it difficult to trace the source of the content rendered on the outcome page.
"Making your application" section has been extracted to a partial, with all its (sub)partials nested under a new "overseas_passports/making_your_application" dir. This helps to isolate partials related to this section only, because otherwise it can get really confusing to deal with many partials in the main overseas-passports directory. Also, the ips_application_result file is rather big, reducing the overall number of lines in it makes it slightly easier to work with it.
Some cleanup commits have been made before the last and the most important change. These commits have helped me detect duplicated paragraphs.