Skip to content
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

Unify marriage abroad fees content #2355

Merged
merged 25 commits into from
Mar 17, 2016
Merged

Conversation

erkde
Copy link
Contributor

@erkde erkde commented Mar 11, 2016

Pivotal Ticket: https://www.pivotaltracker.com/story/show/109438906

This PR is the second part of this ticket (following on from #2350) and brings together all the fee related content throughout the marriage abroad smart answer into one partial and allows outcomes to selectively enable which consular fees to show the user.

@erkde erkde force-pushed the unify_marriage_abroad_fees_content branch from 5f7c365 to 14153b8 Compare March 15, 2016 07:56
@erkde erkde removed the Don't merge label Mar 15, 2016
@erkde
Copy link
Contributor Author

erkde commented Mar 15, 2016

With #2350 now merged, this is ready for review

@chrisroos chrisroos self-assigned this Mar 15, 2016
@chrisroos
Copy link
Contributor

Very minor: In the note for commit 0b12c25 ("Regenerate test artefacts for marriage abroad") you've mentioned two expected space changes but I noticed a third:

-Performing a marriage ceremony| £140
+Performing a marriage ceremony | £140

It might be worth updating the commit note to explain that this is also intentional.

@chrisroos
Copy link
Contributor

This all looks great to me, @erikse. Hopefully this'll help avoid the fees getting out of sync in future.

The only minor comment I have is about the commit titles. I realise this is possibly/probably subjective but I would've tried to avoid some of the duplication you've ended up with.

Having been through the commits, I might've used titles like:

1192199 Add consular service fees table to marriage abroad
95ae22b Replace _fee_table_affirmation_55 with _consular_fees_table
cf114ba Replace _fee_table_affidavit_55 with _consular_fees_table
903d809 Replace _fee_table_oath_55 with _consular_fees_table
28b7730 Replace _fee_table_45_70_55 with _consular_fees_table
7b86a5e Replace affidavit_for_marriage fees in _fees with _consular_fees_table
e675778 Replace fees for Finland in _fees with _consular_fees_table
c085a32 Replace affirmation_for_freedom_to_marry fees in _fees with _consular_fees_table
f48b70c Replace _fee_table_os_germany with _consular_fees_table
37d4570 Remove duplication in os_affirmation/_fees
7d6ea0d Replace fees for China in _fees with _consular_fees_table
3f5738a Replace fees for Egypt in _fees with _consular_fees_table
62cfa7e Replace fees for Peru in _fees with _consular_fees_table
4987361 Replace _fees_table_ss_marriage_and_partnership with _consular_fees_table
add3fed Replace fees in outcome_ss_marriage with _consular_fees_table
d22aba7 Replace fees in outcome_ss_marriage with _consular_fees_table
6835a5b Replace fees in outcome_cp_consular with _consular_fees_table
26de31f Replace fees in outcome_cp_or_equivalent with _consular_fees_table
4c8070d Replace fees in outcome_os_belarus with _consular_fees_table
a7fb2f3 Replace fees in outcome_os_italy with _consular_fees_table
2967e88 Replace fees in outcome_os_other_countries with _consular_fees_table
0fd638b Replace fees in outcome_os_consular_cni with _consular_fees_table
f1a2e79 Replace fees in outcome_os_kosovo with _consular_fees_table
0b12c25 Regenerate test artefacts for marriage abroad
14153b8 Regenerate file checksums for marriage abroad

@chrisroos chrisroos added the LGTM label Mar 16, 2016
@erkde
Copy link
Contributor Author

erkde commented Mar 17, 2016

To keep things at 50 characters or less, I've been writing pretty generic commit titles, usually mentioning the smart answer effected by the change (if it is specific). But those titles look a bit more useful, are we all okay to start going over the 50 character restriction @floehopper @ikennaokpala @pmanrubia ?

@pmanrubia
Copy link
Contributor

@erikse If you all agree, I am good with going over 50 characters as long as the commit messages are not truncated in Github (I guess the limit is 72 characters in GH?)

@erkde
Copy link
Contributor Author

erkde commented Mar 17, 2016

It seems like the GDS Styleguide for commit messages still restricts us to 50 characters:

Commit messages should start with a one-line summary no longer than 50 characters. Various Git tools (including GitHub) use this as the commit summary, so you should format it like an email subject, with a leading capital and no full stop.

Maybe this could be relaxed to 69 characters, github seems okay with showing titles up to that length with truncating them and showing the elipses

@floehopper
Copy link
Contributor

I've always treated the 50 character limit as a guideline, not a hard-and-fast rule i.e. I try really hard to come up with a 50-char summary line, but if I can't then I don't mind going slightly over.

For me the key thing is knowing the reason behind the limit i.e. that some git clients will not display more than 50 chars of the summary line. If I go over the limit, I try to keep the most important part at the beginning.

My preference would be to keep the 50-character limit, but accept that it's a guideline. I would prefer this to just increasing the limit in order to have it as a hard-and-fast rule. Especially if the new limit is just based on GitHub's current UI.

@erkde
Copy link
Contributor Author

erkde commented Mar 17, 2016

I'm finding when we have longer variable or file names, it's almost impossible to write a commit message that shows the precise context, so that's when I've been falling back tagging them with a wider scope of identifying the smart answer the change belongs to.

What tool(s) in particular restrict you to 50 characters? Maybe it's worth considering if there are alternatives/newer versions that would allow a longer title. 50 characters, given the practice of having long class/method/file names in Ruby, doesn't leave much room to add much else.

@pmanrubia
Copy link
Contributor

In refactorings, for example, the smaller the commits, the more difficult it is to write 50 characters messages without commit duplications across the PR, so I like the idea of relaxing the constraint of 50 characters but trying to stick to it. A balanced solution for me.

erkde added 16 commits March 17, 2016 13:04
This commit introduces a partial for rendering consular services
and their corresponding fees, as shown to users in many of the marriage
abroad outcomes.

An outcome can use this partial by passing an array of services to
show the user in the call to render the partial, and the partial in
turn will render each service in the order it was received.

As the first commit of this PR, the fees from partial
`_consular_cni_os_fees_incl_null_osta_oath_consular_letter` are added
to a `consular_fees_table_items`, and is removed. All calls to render
the removed partial are replaced with calls to render the new fees
table.
Move content from _fee_table_affirmation_55 into the new
_consular_fees_table_items partial so it can be removed.
Move the Affidavit for marriage content to partial
_consular_fees_table_items so we can delete partial
_fee_table_affidavit_55
Move the administering_oath_or_making_declaration content from partial
_fee_table_oath_55 partial to _consular_fees_table_items and remove
_fee_table_oath_55.
All content contained in partial _fee_table_45_70_55 now exists in
_consular_fees_table_items, so it can be removed and replaced with a
call to render _consular_fees_table.
Replace duplicate content in _fees with calls to render partial
_consular_fees_table.
Replace content in _fees by moving it to the _consular_fees_table_items
and render _consular_fees_table in its place.
Replace duplicated content for “Affirmation for freedom to marry in
English”, and “Affirmation for freedom to marry in any other language”
by moving content from _fees to _consular_fees_table_items.
Remove partial containing consular fees that are now available
in _consular_fees_table_items.
As the code in elsif branch is identical to the if branch, we
can remove it.
Remove content from _fees partial and replace with calls to render it
via _consular_fees_table.
Removes duplicate content for Egypt outcome in the _fees partial,
and replaces with call to _consular_fees_table partial.
Removes duplicate content for Peru outcomes in _fees partial,
and replace with call to render it via _consular_fees_table.
Move fee content from same sex outcome to _consular_fees_table_items
partial and replace duplicate content in same sex outcome with call
render _consular_fees_table.
Replace consular fee content in same sex outcome outcome_ss_marriage
by moving it to the _consular_fees_table_items partial.
Adds performing a marriage ceremony and posting marriage notice to
partial _consular_fees_table_items and remove duplicate content
in same sex outcome outcome_ss_marriage.
erkde added 9 commits March 17, 2016 13:06
Replace fee content in outcome outcome_cp_consular by moving "Issuing
a civil partnerships certificate" and "Registering a civil
partnership" to _consular_fees_table_items rendering that via
_consular_fees_table.
Replace content in outcome_cp_or_equivalent by moving fee content to
partial _consular_fees_table_items and rendering it via
_consular_fees_table.
Add consular fee content for issuing a certificate in custom and law
to the `consular_fees_table_items` partial and replace duplicate content
in outcome for Croatia.
The artefacts have three white space changes that are fixed as
part of this PR, correcting the following artefact outputs:

-Receiving a notice of registration  | £65
+Receiving a notice of registration | £65

-##Fees
+## Fees

-Performing a marriage ceremony| £140
+Performing a marriage ceremony | £140
@erkde erkde force-pushed the unify_marriage_abroad_fees_content branch from 14153b8 to a34a3f2 Compare March 17, 2016 13:08
@erkde
Copy link
Contributor Author

erkde commented Mar 17, 2016

I've amended the commit titles to try and give a bit more context to the change, and rebased with master.

erkde pushed a commit that referenced this pull request Mar 17, 2016
@erkde erkde merged commit 27e8e3f into master Mar 17, 2016
@erkde erkde deleted the unify_marriage_abroad_fees_content branch March 17, 2016 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants