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

New publications page toggle #2240

Merged
merged 3 commits into from
Jul 12, 2024
Merged

New publications page toggle #2240

merged 3 commits into from
Jul 12, 2024

Conversation

mtaylorgds
Copy link
Contributor

Add a feature toggle for routing the root path

Route requests to the root path (which is where the list of filtered publications is shown), based on the status of the "design_system_publications_filter" feature toggle to either LegacyRootController or RootController . For now, these controllers are functionally identical, but the RootController will be changed in upcoming PR(s) to use new designs that take advantage of the GOV.UK Design System.

Trello card

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This work is part of upgrading Mainstream Publisher to use the GOV.UK Design System, in place of the current, and outdated, bootstrap UI.

This commit renames the `RootController` class to `LegacyRootController`. The next commit will create a new `RootController` class, with a feature toggle to control which is used.

Some tests, which were asserting that the "index" action of the "root" controller was being redirected to, have been updated to instead assert that the `root_path` has been redirected to so that they are agnostic to this change.

Renaming the legacy controller now (rather than creating a new controller for the new version) will make cleanup at the end easier when we remove the feature toggle and all legacy root code.
Create a new `RootController` class and conditionally route to it or the
 `LegacyRootController` based on whether the new
 "design_system_publications_filter" feature is enabled (it defaults to
 disabled).

In this commit `RootController` is an exact duplicate of
 `LegacyRootController`, but future commits will update this so that it
 uses the new, GOV.UK Design System-based, design.
app/views/legacy_root/index.html.erb Dismissed Show dismissed Hide dismissed
app/views/legacy_root/index.html.erb Dismissed Show dismissed Hide dismissed
The `LegacyRootController` is a duplicate of the `RootController` and so
 all of the same brakeman results (and therefore ignores) apply.
Copy link
Contributor

@davidtrussler davidtrussler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@mtaylorgds mtaylorgds merged commit d98264e into main Jul 12, 2024
12 checks passed
@mtaylorgds mtaylorgds deleted the new-publications-page-toggle branch July 12, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants