Skip to content

Remove the legacy container and stylesheet once no page needs them #217

Description

@openipc-ai

Part of #206 (Phase 3). Depends on #208, #209, #210, #213, #214, #215, #216.

Why

app/views/layouts/application.html.erb:64-75 has two branches: pages that set content_for :fullwidth lay out their own sections, and every other page is wrapped in div.container.mb-4. The second branch exists so the relaunch could land without touching every page at once. When the issues above are done, no page takes it, and a switch nobody uses is where the next person adds a page in the old design by accident. pages/_legacy.scss is already down to one rule and loses that in #213. test/controllers/legacy_pages_test.rb exists to pin the wrapper and will have no pages left.

What to change

  • The layout renders <main> with one branch; the content_for :fullwidth switch and the container fallback go. Flash messages keep their own container so they do not run edge to edge.
  • Every template that sets content_for :fullwidth stops setting it, since it is the only behaviour now.
  • Delete app/assets/stylesheets/pages/_legacy.scss and its import in application.bootstrap.scss.
  • Delete test/controllers/legacy_pages_test.rb; the pages it smoke-tested are in relaunch_pages_test.rb by then. Add one assertion there: no template under app/views contains fullwidth.

Done means

  • grep -r fullwidth app/ test/ finds nothing except the new assertion.
  • bin/rails test green; the compiled selector set of application.css differs from before only by the removed rule.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions