Skip to content

Remove separate "without_sidebar" layout #2043

@trichoplax

Description

@trichoplax

Currently the layouts application.html.erb and without_sidebar.html.erb have mostly duplicated code. This gives two problems:

  1. There is a risk of code divergence if someone does not realise that both need to be changed.
  2. The slight differences that already exist between them may not be expected by someone switching between the layouts. The naming suggests that the only change will be the lack of sidebar, so the other changes could be surprising.

Ideally the application layout would conditionally include the sidebar based on a variable (in the same way as the @prevent_sidebar variable already does this for pages that only sometimes need a sidebar).

When this is done, the other differences between the two layouts can either be removed (if they were accidental divergence) or included based on different variables with names that make clear what is changing (rather than the sidebar variable affecting unrelated things and causing surprise).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions