Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The initial requirement for the story was that however a user comes to the new bill view page the back link should take them to where they came from. This could be 1 of 3 places currently - bill run summary - billing account summary - billing account all bills When you first come to the view bill page we use [referrer](#486) to generate the back link. At this point we can get you back to where you came from. But that list is incomplete with the addition of the view bill-licence page (see WATER-4156 ). So, you come to the view bill page, then click through to the view bill-licence page and then go back, now `referrer` is the view bill-licence. This results in the user being stuck in a loop. ``` [source] --> [view bill ] --> [view bill-licence] --> [view bill ] [back = source] [back = view bill ] [back = view bill-licence] ``` Having discussed this with our designer, we both agree having the back link attempt to recreate what the back button does is an anti-pattern. Back links we build into the pages should help a user navigate through a _planned_ journey. Essentially, if you come from, for example billing account summary, you have jumped from the licence summary journey to the bill runs journey. As such when you go back, you should go back through the bill runs journey. There are relevant points that allow the user to switch back, for example clicking the Billing account link in the view bill page. If the user wants back button behaviour then the button is always there.
- Loading branch information