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

Layouts don't always work when a prototype is migrated #2072

Closed
4 tasks done
BenSurgisonGDS opened this issue Mar 30, 2023 · 2 comments
Closed
4 tasks done

Layouts don't always work when a prototype is migrated #2072

BenSurgisonGDS opened this issue Mar 30, 2023 · 2 comments
Assignees
Labels
🐛 Bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@BenSurgisonGDS
Copy link
Contributor

BenSurgisonGDS commented Mar 30, 2023

What

The use of layouts should be consistent when creating or migrating a prototype so that they are consistent with the documentation for version 13.

Version 12 and before had app/views/layout.html (and app/views/layout-unbranded.html)

Version 13 has app/views/layouts/main.html

The idea being we can rely on layouts being in the layouts folder, and possibly offer the user a choice of layouts when creating pages from templates.

Layouts help the user make changes that affect multiple pages, for example a custom header, footer, scripts and so on.

In migration, if the old layout.html has changed at all, we do not provide a new layouts/main.html. This means new pages made from templates will not work or even viewed. This is not highlighted to the user as a migration fail.

We could:

  • fix the migration script to process layouts better, and warn about this issue
  • add a check to the kit that helps users who have already migrated to fix it via the Manage Prototype UI

Who needs to work on this

  • developers

Who needs to review this

  • developers

Done when

  • Dev discussion on whether we make change @joelanman @nataliecarey
  • Raise a ticket to fix the migration script
  • Design the UX for people who have migrated and have a missing layouts/main
  • The way layouts are used matches the version 13 documentation for both create and migrate
@ruthhammond ruthhammond changed the title Use of layouts do not match documentation for v13 when a prototype is migrated. Discuss use of layouts not matching documentation for v13 when a prototype is migrated Apr 11, 2023
@joelanman joelanman changed the title Discuss use of layouts not matching documentation for v13 when a prototype is migrated Layouts don't always work when a prototype is migrated Apr 12, 2023
@joelanman joelanman added 🐛 Bug Something isn't working the way it should (including incorrect wording in documentation) and removed Investigation labels Apr 12, 2023
@joelanman joelanman self-assigned this Apr 12, 2023
@joelanman
Copy link
Contributor

discussed with @nataliecarey - this is a regression, there should be a fallback layout if layouts/main is missing so templates continue to work

@joelanman
Copy link
Contributor

joelanman commented Apr 14, 2023

investigated again, the fallback does seem to work. There is definitely a bug in migration though - it should error if layout.html has been edited. Currently it does not, and it deletes the includes that layout.html relies on.

There is a separate bug:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

No branches or pull requests

3 participants