alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
306 stars 236 forks source link

Migration script doesn't update `extends` lines #1842

Closed joelanman closed 1 year ago

joelanman commented 1 year ago

Description of the issue

When migrating a prototype that uses the unbranded layout, those pages stop working as the old extends line does not work:

{% extends "layout_unbranded.html" %}

In V13 it should be

{% extends "govuk-prototype-kit/layouts/unbranded.html" %}

Steps to reproduce the issue

Use the migrate command to migrate an old prototype that used unbranded layout

Actual vs expected behaviour

Expected: the extends line would be updated, like the normal layout extends line is updated Actual: the extends line is not updated

Environment (where applicable)

ruthhammond commented 1 year ago

@joelanman to discuss further how extends line are updated currently

lfdebrux commented 1 year ago

Note, the migration script currently does not update the extends directive in any existing views (even to the point where we don't move the file layout.html to layouts/main.html). So this ticket might be a little tricky.

ruthhammond commented 1 year ago

There are other situations where layout.html is expected, should we treat them all the same?